LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 658|回复: 9

有关使用Samba设置成NT Primary Domain Server疑问

[复制链接]
发表于 2004-10-26 17:50:54 | 显示全部楼层 |阅读模式
我已经设置好了Samba设定如下:
  1. # Global parameters
  2. [global]
  3. workgroup = ccgd.com
  4. netbios name = ccgd
  5. security = user
  6. encrypt passwords = yes
  7. smb passwd file = /etc/samba/smbpasswd
  8. domain logons = yes
  9. domain master =yes
  10. preferred master = yes
  11. local master =yes
  12. os level = 64
  13. #logon path = \\%N\profiles\%u
  14. #logon drive = H:
  15. #logon home = \\homeserver\%u\winprofile
  16. #logon script =scripts\%U.bat
  17. wins support = yes
  18. #add machine script = /usr/sbin/useradd -d /dev/null -g 421 \
  19. #-s /bin/false -m %u; passwd -l %u

  20. [netlogon]
  21. path = /var/lib/samba/netlogon
  22. read only = yes
  23. browseable = no
  24. share modes = no

  25. #[profiles]
  26. #path = /var/lib/samba/profiles
  27. #read only = no
  28. #create mask = 0600
  29. #directory mask = 0700
复制代码


设置用户号时,完全依据说明书中的指示作:
1.  设置Linux机器友善用户号:
root# useradd -g machines -d /dev/null -c "machine nickname" -s /bin/false machine_name$
root# passwd -l machine_name$

2.  在Samba中增加机器用户:
root# smbpasswd -a -m machine_name

3.  增加Linux系统用户:(testing)
root# useradd testing

4.  增加Samba用户:(password testing)
root# smbpasswd -a testing

5.  重启Samba

在试用XP进入时,成功显示Logon提示,但是输入呼号(testing)和密码(testing)后却返回错误:
The following error occured attempting to join the domain "ccgd.com"
Access is Denied

请问问题出现在哪?需要如何修正这问题?
 楼主| 发表于 2004-10-27 12:14:01 | 显示全部楼层

顶一下

有哪位大侠可以帮忙?

相信是用户户口设置方面出现问题。有谁或许可以详细告知有关此项目中,用户户口设置的基本要求?
发表于 2004-10-27 13:03:43 | 显示全部楼层
可能profiles的权限问题?
 楼主| 发表于 2004-10-27 14:09:46 | 显示全部楼层
可以给予可以实现的例子么?
 楼主| 发表于 2004-10-27 15:16:28 | 显示全部楼层
可以给予可以实现的例子么?
发表于 2004-10-27 15:45:50 | 显示全部楼层
[global]
        workgroup = SERVER
        netbios name = SHLINUX
        server string = Samba PDC running %v
                socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192
                os level = 90
                preferred master = yes
                local master = yes
                domain master = yes
                domain logons = yes
                security = user
                admin users = sp02001
                encrypt passwords = yes
                domain logons = yes
                log file = /var/log/samba/log.%m
                log level = 2
                max log size =50
                logon home = \\%L\%u
                logon drive = M:
                logon path = \\%L\profiles\%U
                logon script = %U.bat
#               logon script = logon.bat
                ldap ssl = no
                time server = Yes
                dns proxy = No
                interfaces = eth0, 192.168.7.112
                winbind trusted domains only = Yes
                bind interfaces only = Yes


        dos charset = CP950
        unix charset = CP950
        hosts allow = 192.168.1., 192.168.7., 127.0.0.1

[profiles]
path = /public/sambapdc/profiles
writeable = yes
browseable = no
create mask = 700
directory mask = 700
force directory mask = 2700

[netlogon]
comment = Network Logon Service
path = /public/sambapdc/netlogon
read only = yes
guest ok = yes
browseable = no
发表于 2004-10-27 15:47:49 | 显示全部楼层
cut -d: -f1,5 /etc/passwd | grep ^s[emnlpar][0-9][0-9][0-9][0-9][0-9] > users
for user in $(cut -d: -f1 users)
do
echo "net use y: \\\192.168.7.112\samba /y" > $user.bat;
dep=$(grep $user users | cut -d: -f2);
echo "net use x: \\\192.168.7.112\\$dep /y" >> $user.bat;
done
为%U.bat文件制作方法
发表于 2004-10-27 15:48:46 | 显示全部楼层
[root@shlinux sambapdc]# ls -ld *
drwxrwxrwt   2 root root 4096 Oct 27 15:54 netlogon/
drwxrwxrwt  34 root root 4096 Oct 21 10:09 profiles/
 楼主| 发表于 2004-10-30 10:36:30 | 显示全部楼层
最初由 河边星星 发表
cut -d: -f1,5 /etc/passwd | grep ^s[emnlpar][0-9][0-9][0-9][0-9][0-9] > users
for user in $(cut -d: -f1 users)
do
echo "net use y: \\\192.168.7.112\samba /y" > $user.bat;
dep=$(grep $user users | cut -d: -f2);
echo "net use x: \\\192.168.7.112\\$dep /y" >> $user.bat;
done
为%U.bat文件制作方法


[root@shlinux sambapdc]# ls -ld *
drwxrwxrwt   2 root root 4096 Oct 27 15:54 netlogon/
drwxrwxrwt  34 root root 4096 Oct 21 10:09 profiles/


有些不明白的地方请教:
1.  Profiles的功用是什么?
2.  %U.bat是应该放在什么地方?
3.  是否说用户在进入后所启动的第一个文件就是%U.bat?
发表于 2004-10-31 15:04:09 | 显示全部楼层
logon path = \\%L\profiles\%U
logon script = %U.bat
如果用户域登录了可以访问
\\192.168.7.112\profiles\sp02001
其中192.168.7.112为域控制器,profiles为
[profiles]
path = /public/sambapdc/profiles
,还有sp02001为域登录的用户名....
在\\192.168.7.112\profiles\sp02001
中有域用户的用户环境文件,还有一些打开过的文件的快捷等
%U.bat是代表的每一个用户的用户名.bat如我登录用的是sp02001则对应的是sp02001.bat
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表