从WinXP PC访问Samba

我一直在努力让Samba能够从我的Windows PC访问。 所以我将从一个基本问题开始:

Samba是否需要使用与Windows PC用户帐户相同的身份validation凭据? 他们需要与Linux用户帐户相同吗? 相同的用户名? 相同的密码?

我们的Windows PC使用Windows Server 2003 Active Directory LDAP系统进行身份validation。 当我从Windows导航到\\MyLinuxServer时,可以看到共享,当我尝试导航到共享时,系统提示input密码。 我input我的用户名和密码,我已经通过sudo smbpasswd进行设置,并且失败。 当它失败的时候,它返回的是Windows域名和密码之前的一个反斜杠。

问题:

  1. 我是否需要将Unix用户帐户放在与Windows用户名匹配的服务器上?
  2. 我是否需要让服务器join域,并以这种方式validation?

老实说,我甚至不在乎这个东西甚至不使用密码。 整个公司都可以看到,但嘿。 我还没有得到那个工作。 如果我设置security = share ,然后提示input密码 – 没有用户名 – 并失败。

如果我在服务器上运行smbclient -L mylinuxserver ,它将提示input密码,然后无法Connection to mylinuxserver failed (Error NT_STATUS_CONNECTION_REFUSED)无论我input密码。

netstat -a | grep netbios-ssn netstat -a | grep netbios-ssn显示为LISTEN。

nmblookup -B mylinuxserver __SAMBA__与这个输出一起使用,包括正确的IP地址而不是xxxx:

 querying __SAMBA__ on 127.0.1.1 xxxx __SAMBA__<00> 

这是testparm的输出:

 Load smb config files from /etc/samba/smb.conf rlimit_max: rlimit_max (1024) below minimum Windows limit (16384) Processing section "[homes]" Loaded services file OK. Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions [global] server string = My Excellent Server interfaces = eth0, lo bind interfaces only = Yes map to guest = Bad User obey pam restrictions = Yes pam password change = Yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . unix password sync = Yes syslog = 0 log file = /var/log/samba/log.%m max log size = 1000 dns proxy = No panic action = /usr/share/samba/panic-action %d [homes] comment = Home Directories read only = No create mask = 0664 directory mask = 0775 

我认为testparm输出与smb.conf相同。 显然不是,这里是smb.conf

 $ cat /etc/samba/smb.conf | grep "^[^#;]" [global] workgroup = WORKGROUP server string = Landscape Capital Server dns proxy = no interfaces = eth0 lo bind interfaces only = yes log file = /var/log/samba/log.%m max log size = 1000 syslog = 0 panic action = /usr/share/samba/panic-action %d security = user encrypt passwords = true passdb backend = tdbsam obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . pam password change = yes map to guest = bad user [homes] comment = Home Directories browseable = yes read only = no create mask = 0664 directory mask = 0775 

我不得不在Windows密码提示中指定linux主机名作为“域”。 即mylinuxserver\mylinuxusername

好悲伤:( 🙁