Samba error: session setup failed: NT_ STATUS_ LOGON_ FAILURE

On the command line, type the command:

~ $smbclient – L \ \ 127.0.0.1

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

Domain = = [Example] the OS/Unix Server = [Samba 3.6.3]

Sharename Type the Comment

— — — — — — — — — — — — — — — — —

print $Disk Printer Drivers

cdrom Disk Samba server’s cd-rom

Music Disk Music files

IPC$IPC IPC Service (Samba File Server)

Domain = = [Example] the OS/Unix Server = [Samba 3.6.3]

Server Comment

— — — — — — — — — — — — — — — –

Test1 Samba File Server

Test2

Workgroup Master

— — — — — — — — — — — — — — — –

Example Test2

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

Read More: