LinuxSir.cn,穿越时空的Linuxsir!

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

求助!

[复制链接]
发表于 2003-7-2 15:26:31 | 显示全部楼层 |阅读模式
我配置好了samba(模擬域,)但只有windows98可以加入,windows2000加入時照例?棾鲆粚υ捒蛞逸斎霌碛惺褂脵嘞薜膸裘Q及密碼?砑尤刖W域,結果我輸入那些smbuser或者linux本機的都是失敗,請幫忙看一下,以下為smb.conf文件內容

[global]
   workgroup = LXL
   server string = Samba Server
   netbios name = mis010
   hosts allow = 192.168.0. 192.168.1. 192.168.2. 127.
   printcap name = /etc/printcap
   load printers = yes
   load printers = yes
cessary to spell out the print system type unless
   printing = lprng
;  guest account = pcguest
   log file = /var/log/samba/%m.log
   max log size = 0
   security = user
   encrypt passwords = yes
   smb passwd file = /etc/samba/smbpasswd
   unix password sync = Yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *New*password* %n\n *Retype*new*password* %n\n ;   
   pam password change = yes
  username map = /etc/samba/smbusers
;   include = /etc/samba/smb.conf.%m
;  obey pam restrictions = yes
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
;   interfaces = 192.168.12.2/24 192.168.13.2/24
;   remote browse sync = 192.168.3.25 192.168.5.255
;   remote announce = 192.168.1.255 192.168.2.44
;   local master = no
;   os level = 33
   domain master = yes
startup
   preferred master = yes
   domain logons = yes
;   logon script = %m.bat
;   logon script = %U.bat
;   logon path = \\%L\Profiles\%U
WINS Server
;   wins support = yes
but NOT both
;   wins server = w.x.y.z
;   wins proxy = yes
names
   dns proxy = no
;  preserve case = no
;  short preserve case = no
;  default case = lower
;  case sensitive = no

#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = no
   writable = yes
   valid users = %S
   create mode = 0664
   directory mode = 0775
# If you want users samba doesn't recognize to be mapped to a guest user
; map to guest = bad user


# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
;   comment = Network Logon Service
;   path = /usr/local/samba/lib/netlogon
;   guest ok = yes
;   writable = no
;   share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
;    path = /usr/local/samba/profiles
;    browseable = no
;    guest ok = yes


# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
# Set public = yes to allow user 'guest account' to print
   guest ok = no
   writable = no
   printable = yes

# This one is useful for people to share files
;[tmp]
;   comment = Temporary file space
;   path = /tmp
;   read only = no
;   public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
;   comment = Public Stuff
;   path = /home/samba
;   public = yes
;   writable = yes
;   printable = no
;   write list = @staff

# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
;   comment = Fred's Printer
;   valid users = fred
;   path = /home/fred
;   printer = freds_printer
;   public = no
;   writable = no
;   printable = yes

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
;   comment = Fred's Service
;   path = /usr/somewhere/private
;   valid users = fred
;   public = no
;   writable = yes
;   printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
;  comment = PC Directories
;  path = /usr/local/pc/%m
;  public = no
;  writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
[public]
   comment = software
   path = /mnt/data/public
   public = yes
   only guest = yes
   writable = yes
   printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
;   comment = Mary's and Fred's stuff
;   path = /usr/somewhere/shared
;   valid users = mary fred
;   public = no
;   writable = yes
;   printable = no
;   create mask = 0765
发表于 2003-7-2 15:57:56 | 显示全部楼层
好;
http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection.html
第九段讲的是将samba作为winNT类型的Domain Controller
我大致看了一下:
主要有两个步骤:
1 配置smb.conf
2 添加“machine trust account“
感觉你第一步作对了
第二步,文章介绍了手工添加,和在smb.conf中作配置两种办法。希望对你有帮助。
 楼主| 发表于 2003-7-2 16:04:39 | 显示全部楼层
謝謝sfatsdu兄,馬上試試
 楼主| 发表于 2003-7-2 16:07:42 | 显示全部楼层
可惜我的英文不太好,
有沒有中文的?
发表于 2003-7-2 21:37:18 | 显示全部楼层
winNT/win2k/winXP 比win9x有更多的安全设计,在ms的网络体系里,域里的成员有认证,以防止同NetBIOS的机器加入域。
http://www.linuxforum.net/doc/Samba-HOWTO-Collection.html
linuxforum上的成果。
 楼主| 发表于 2003-7-3 00:12:56 | 显示全部楼层
sfatsdu兄,你真是好人,那篇文檔中間有一段
"由于Samba 2.2并未真正实现NT组账号和UNIX组账号间的映射(原因一言难尽),所以你应该参考smb.conf文件中的domain admin users和domain admin group两个选项来建立域管理员之类的账号。"
其中"domain admin users""domain admin group"為鏈接,我認為這就是關鍵,但很可惜鏈接的說明已經移位了.找了半夜還是沒找到這兩個.你如果以前有看過能否麻煩您幫忙找一下,不甚感激!
发表于 2003-7-3 09:11:07 | 显示全部楼层
我觉得你是没有添加“machine trust account",文档中好像没有强调,Linux机器上名是xxxx$的是"machine trust account"
比如说你要把NetBIOS 名是aaaa的用户加到域里,则要在
Linux机器上添加名是 "aaaa$”的用户,
/usr/sbin/useradd -g 100 -d /dev/null -c "machine nickname" -s /bin/false aaaa$
再用
smbpasswd -a -m aaaa
把它加到Samba的密码库里。
-m 选项表示这是"machine account"
这是手工添加的方法。
至于 "domain admin user" "domain admin group"是为了完整实现win NT 4域控制器的概念,不是那么要紧的。

还有机器加入域时添加帐号的方法,
在smb.conf中要有:
[global]
   # <...remainder of parameters...>
   add user script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M %u
英文文档中有如何让WinNT/win2k加入域的方法,找个英语好的看看
9.4.3节
 楼主| 发表于 2003-7-4 17:05:40 | 显示全部楼层
WIN9X都能加入,WIN2K和WINNT加入域時最重要的是需要一個域管理員的名稱和密碼,這個就是關鍵了.
sfatsdu兄你有沒試過?
能否把你的配置說明發上?砗脝?
或者傳給我lxl54321@163.com
不甚感激ing
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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