Samba 不接受我的密码

Samba 不接受我的密码

我最近全新安装了 Ubuntu 14.04lts。

samba 已安装并且我可以看到我的工作组中的计算机。

我昨天能够从工作组上的 Windows XP 计算机传输文件。

我今天无法再访问 Windows XP 计算机上的文件。

Samba 要求输入用户和密码,但是不被接受。密码和用户是使用 sudo 设置的smbpasswd -a

我使用了与登录名相同的密码。我已按照 中的建议更改了安全设置/etc/samba/smb.conf

这是我的smb.conf

WARNING: Ignoring invalid value 'share' for parameter 'security'
Processing section "[printers]"
Processing section "[print$]"
Processing section "[Music]"
Processing section "[Pictures]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
server string = %h server (Samba, Ubuntu)
server role = standalone server
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
name resolve order = bcast, host
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb
read only = No

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
print ok = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

[Music]
path = /home/laverne/Music
guest ok = Yes

[Pictures]
path = /home/laverne/Pictures
guest ok = Yes
laverne@laverne-N61PC-M2S:~$ smbclient -L
WARNING: Ignoring invalid value 'share' for parameter 'security'
Usage: smbclient [-?EgBVNkPeC] [-?|--help] [--usage]

    [-R|--name-resolve=NAME-RESOLVE-ORDER] [-M|--message=HOST]
    [-I|--ip-address=IP] [-E|--stderr] [-L|--list=HOST]
    [-m|--max-protocol=LEVEL] [-T|--tar=<c|x>IXFqgbNan]
    [-D|--directory=DIR] [-c|--command=STRING] [-b|--send-buffer=BYTES]
    [-t|--timeout=SECONDS] [-p|--port=PORT] [-g|--grepable]
    [-B|--browse] [-d|--debuglevel=DEBUGLEVEL]
    [-s|--configfile=CONFIGFILE] [-l|--log-basename=LOGFILEBASE]
    [-V|--version] [--option=name=value]
    [-O|--socket-options=SOCKETOPTIONS] [-n|--netbiosname=NETBIOSNAME]
    [-W|--workgroup=WORKGROUP] [-i|--scope=SCOPE] [-U|--user=USERNAME]
    [-N|--no-pass] [-k|--kerberos] [-A|--authentication-file=FILE]
    [-S|--signing=on|off|required] [-P|--machine-pass] [-e|--encrypt]
    [-C|--use-ccache] [--pw-nt-hash] service <password>
laverne@laverne-N61PC-M2S:~$ smbclient -L laverne-N61PC-M2S
WARNING: Ignoring invalid value 'share' for parameter 'security'
Enter laverne's password: 
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.6-Ubuntu]

Sharename       Type      Comment
---------       ----      -------
print$          Disk      Printer Drivers
Music           Disk      
Pictures        Disk      
IPC$            IPC       IPC Service (laverne-N61PC-M2S server (Samba, Ubuntu))
Brother-MFC-885CW Printer   Brother MFC-885CW
Videos          Disk      
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.6-Ubuntu]

Server               Comment
---------            -------
BRW001E4CC16B21      
                     laverne-N61PC-M2S server (Samba, Ubuntu)

Workgroup            Master
---------            -------
LIEBROCK_HOME        NETBOOK-01
WORKGROUP            LAVERNE-N61PC-M2S    

欢迎任何建议。

答案1

就我而言,在 smb.conf 中添加下面的几行解决了这个问题。

security = user
map to guest = Bad User

http://sysadmin.toshiro.biz/services/samba-services/samba-troubleshooting/

答案2

谢谢,这个办法很管用,

我有 AIX 7.1 和 Windows 7 和 Windows 10 上的用户。

我尝试了所有组合,但 Windows 10 在 AD 上失败了。

我正在粘贴我的配置,以便对其他人有用。

[global]
security = user
netbios name = aix-server-fqdn
password server = AD SERVER
workgroup = WORKGROUP
realm = DOMAIN WITH FQDN
min protocol = SMB2
protocol = SMB2
map to guest = Bad User

相关内容