![用Samba做域控制器_休闲](https://s2.51cto.com/attachment/201003/201003041267685636109.png?x-oss-process=image/resize,m_fixed,w_1184)
workgroup = longyings.com
netbios name = server
server string = Samba Server %v
hosts allow = 127.0.0.1 172.16.0.0/255.255.0.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192
local master = yes
os level = 64
domain master = yes
preferred master = yes
security = user
encrypt passwords = yes
domain logons = yes
log file = /var/log/samba/log.%m
max log size = 50
#用户漫游配置文件
logon home = \\%L\%U\.profile
logon drive = H:
logon path = \\%L\profiles\%U
logon script = netlogon.bat
comment = Home Directories
browseable = no
writeable = yes
comment = Network Logon Service
path = /home/netlogon
read only = yes
browseable = no
write list= root
path = /home/profiles
writeable = yes
browseable = no
create mask = 0600
directory mask = 0700
![用Samba做域控制器_休闲_02](https://s2.51cto.com/attachment/201003/201003041267687976031.png?x-oss-process=image/resize,m_fixed,w_1184)
mkdir -m 0775 /home/netlogon
chown root.admin /home/netlogon
mkdir /home/profiles
chown 1757 /home/profiles
groupadd 007
useradd -g 007 -d /dev/null -s /bin/false vs1$
smbpasswd -a -m vs1$
smbpasswd -a root
smbpasswd -a 008
![用Samba做域控制器_Samba_03](https://s2.51cto.com/attachment/201003/201003041267689634687.png?x-oss-process=image/resize,m_fixed,w_1184)
7:关掉LINUX的防火墙 不然server2003可能会联系不到域
![用Samba做域控制器_职场_04](https://s2.51cto.com/attachment/201003/201003041267690403500.png?x-oss-process=image/resize,m_fixed,w_1184)
![用Samba做域控制器_职场_05](https://s2.51cto.com/attachment/201003/201003041267694294093.png?x-oss-process=image/resize,m_fixed,w_1184)