On the command line, type the command:
~ $smbclient – L \ \ 127.0.0.1 span>
session setup failed: NT_STATUS_LOGON_FAILURE
this is because the user ID executing the smbclient command is not a user of the samba service. The solution is as follows:
add the changed user ID to samba
~$smbpasswd -a user ID
set password as required
so that the user ID becomes a user of the samba service, enter the command
~ $smbclient – L \ \ 127.0.0.1 span> span>
Domain = = [Example] the OS/Unix Server = [Samba 3.6.3] span>
span> Sharename Type the Comment span>
span> — — — — — — — — — — — — — — — — — span>
span> print $Disk Printer Drivers span>
cdrom Disk Samba server’s cd-rom
span> Music Disk Music files span>
IPC$IPC IPC Service (Samba File Server)
Domain = = [Example] the OS/Unix Server = [Samba 3.6.3] span>
span> Server Comment span>
span> — — — — — — — — — — — — — — — – span>
span> Test1 Samba File Server span>
span> Test2 span>
span> Workgroup Master span>
span> — — — — — — — — — — — — — — — – span>
span> Example Test2 span>
problem solved.
=============================================================
1. Session setup failed: NT_STATUS_LOGON_FAILURE
this error means that the user is wrong, it may be that the user does not exist, it may also be that the password is wrong, or the user exists in one of the users of samba and the system,
in a word is that the user and password have problems
. The NT_STATUS_BAD_NETWORK_NAME
error indicates that the Shared directory does not exist, or that the permissions are not right
, as in my case. I have a user named xiaowang. In the home directory of xiaowang, I created a new share directory,
, and added share to smb.conf to make it myshare. However, I have designated the valid user of this Shared directory as guest(also a user in the system). Now I have the share directory under home.
==================================================================================
the solution in the latest centos is to run the following command to resolve the samba NT_STATUS_BAD_NETWORK_NAME problem:
setsebool -p samba_enable_home_dirs=1
viewing the logs caused by the samba process being blocked by SELinux from accessing the home directory:
Feb 26 22:56:22 igosvr setroubleshoot: SELinux is preventing the samba daemon from reading users’ home directories. For complete SELinux messages. run sealert -l 6e7522fa-f56c-400e-9e04-3722033573b5
confirm that the SMB service above REDHAT has started and IPTABLES has closed