使用SAMBA构建域服务器

原有域服务器出问题了,为了安全性考虑,就在DEBIAN上用SAMBA架设了一个域服务器。

/etc/samba/smb.conf的内容:

[global]
workgroup = WESTGIS
netbios name = heihe
passdb backend = tdbsam
printcap name = cups
add user script = /usr/sbin/useradd -m %u
delete user script = /usr/sbin/userdel -r %u
add group script = /usr/sbin/groupadd %g
delete group script = /usr/sbin/groupdel %g
add user to group script = /usr/sbin/groupmod -A %u %g
delete user from group script = /usr/sbin/groupmod -R %u %g
add machine script = /usr/sbin/useradd -s /bin/false -d /var/lib/nobody %u
# Note: The following specifies the default logon script.
# Per user logon scripts can be specified in the user account using pdbedit
logon script = scripts\logon.bat
# This sets the default profile path. Set per user paths with pdbedit
logon path = \\%L\Profiles\%U
logon drive = H:
logon home = \\%L\%U
domain logons = Yes
os level = 255
preferred master = Yes
domain master = Yes
idmap uid = 15000-20000
idmap gid = 15000-20000
printing = cups

[homes]
comment = Home Directories
valid users = %S
read only = No
browseable = No
# Printing auto-share (makes printers available thru CUPS)
[printers]
comment = All Printers
path = /var/spool/samba
printer admin = root, wlx
create mask = 0600
guest ok = Yes
printable = Yes
browseable = No
[print$]
comment = Printer Drivers Share
path = /var/lib/samba/drivers
write list = wlx, root
printer admin = wlx, root
# Needed to support domain logons
[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
admin users = root, maryo
guest ok = Yes
browseable = No
# For profiles to work, create a user directory under the path
# shown. i.e., mkdir -p /var/lib/samba/profiles/maryo
[Profiles]
comment = Roaming Profile Share
path = /var/lib/samba/profiles
read only = No
profile acls = Yes

参考http://us3.samba.org/samba/docs/man/Samba-HOWTO-Collection/FastStart.html#id2527688

目前还存在一些问题:

用户的策略设置、每次登录都有提示


已发布

分类

来自

标签:

评论

《 “使用SAMBA构建域服务器” 》 有 3 条评论

  1. wlx 的头像
    wlx

    NT/2000下面登录samba域会困难一点﹐首先你要在Samba服务器上建立windowsNT/2000机器的信用帐号。

    下面以一个计算器名为test的计算机为例﹕

    #useradd -c ‘Test Compter’ -d /dev/null -g share -s /bin/false -r test$
    我们创建了一个Linux本地帐号﹐出于安全的考虑不需要它登录到Linux进行任何操作﹐因此的用户目录为/dev/null,shell是/bin/false.

    然后我们就可以用smbpasswd创建相应的Samba机器帐号﹕

    #smbpasswd -a -m test

    其中-a是添加﹐-m是机器信任帐号。这样﹐依据test$的Linux帐号创建了一个NT域的机器信任帐号test.

    然后在windowsNT/2000上加入Samba域﹐根据提示输入超级用户的用户名称和密码﹐就可以加入Samba域了。

  2. wlx 的头像
    wlx

    郁闷,楼上能用,楼下不能用。
    难道是跨交换机的问题?

  3. wlx 的头像
    wlx

    用ubuntu dapper可以访问samba服务器上的资源
    在WINDOWS XP SP2下使用net use m: //debian/xxx 也可以挂接网络硬盘,但是无法无法登录到域中。

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注