samba - 如何诊断 NAS SMB登录失败?

分享于 

5分钟阅读

ubuntu

  繁體

问题

我可以匿名登录, smbclient -L 10.1.0.25 -UGuest 不用密码:


~ • smbclient -L 10.1.0.25 -Uguest


Enter guest's password: 


Anonymous login successful


Domain=[R] OS=[R] Server=[R]



 Sharename Type Comment


 --------- ---- -------


 PUBLIC Disk 


 IPC$ IPC 


Anonymous login successful


Domain=[R] OS=[R] Server=[R]



 Server Comment


 --------- -------



 Workgroup Master


 --------- -------



我无法用密码登录:


~ • smbclient -L 10.1.0.25 -Ujason


Enter jason's password: 


session setup failed: NT_STATUS_LOGON_FAILURE



更新:工作组信息

用于设备的工作组是SUNNYDALE


~ • nmblookup -A 10.1.0.25 | grep GROUP 


 SUNNYDALE <00> - <GROUP> B <ACTIVE> 



将此添加到smbclient命令也无法工作(现在也在/etc/samba/smb.conf ):


~ • smbclient -L 10.1.0.25 -W SUNNYDALE -U jason


Enter jason's password: 


session setup failed: NT_STATUS_LOGON_FAILURE




答案1

强制工作组是必需的:


smbclient -L 10.1.0.25 -W WORKGROUP -U jason



可以通过运行以下命令验证框的工作组:


$ nmblookup -A 10.1.0.25 | grep GROUP 


 ..__MSBROWSE__. <01> - <GROUP> B <ACTIVE>


 WORKGROUP <00> - <GROUP> B <ACTIVE>


 WORKGROUP <1e> - <GROUP> B <ACTIVE>




答案2

我收到NT_STATUS_LOGON_FAILURE消息,但也收到:


Server does not support EXTENDED_SECURITY but 'client use spnego = yes and 'client ntlmv2 auth = yes'



为了解决这个问题,我必须添加行


use spnego = no



到客户端


/etc/samba/smb.conf



[global]前面的顶部)

现在,如果我连接到NAS,它可以工作,得到:


root@localhost:~# smbclient -L 192.168.1.1 -U admin


WARNING: The"syslog" option is deprecated


Enter admin's password:


Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.33]



 Sharename Type Comment


 --------- ---- -------


 ipc$ IPC IPC Service (SERVERUS)


 Backup Disk 8tb_Seagate_2's Backup in Seagate Backup+ Hub BK


 dropbox Disk TOSHIBA_EXT's dropbox in TOSHIBA External USB 3.0


 WindowsImageBackup Disk TOSHIBA_EXT's WindowsImageBackup in TOSHIBA External USB 3.0


 Rug Disk Seagate_8tb_1's Rug in Seagate Backup+ Hub BK


 drive_backup Disk TOSHIBA_EXT(1)'s drive_backup in TOSHIBA External USB 3.0


 ntfsck.00000000 Disk TOSHIBA_EXT(1)'s ntfsck.00000000 in TOSHIBA External USB 3.0


 archive Disk Seagate_Backup_Plus_Drive's archive in Seagate Backup+ Hub BK


 data_dump Disk Seagate_Backup_Plus_Drive's data_dump in Seagate Backup+ Hub BK


 Decimus_bac Disk Seagate_Backup_Plus_Drive's Decimus_bac in Seagate Backup+ Hub BK


 images Disk Seagate_Backup_Plus_Drive's images in Seagate Backup+ Hub BK


 Net Disk Seagate_Backup_Plus_Drive's Net in Seagate Backup+ Hub BK


 share Disk Seagate_Backup_Plus_Drive's share in Seagate Backup+ Hub BK


 test Disk Seagate_Backup_Plus_Drive's test in Seagate Backup+ Hub BK


 tools Disk Seagate_Backup_Plus_Drive's tools in Seagate Backup+ Hub BK


Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.33]



 Server Comment


 --------- -------


 LIBREELEC LibreELEC


 SERVERUS SERVERUS



 Workgroup Master


 --------- -------


 WORKGROUP LIBREELEC





log  sam  DIA  NAS  SMB  Samba  
相关文章