smbclient getting NT_STATUS_LOGON_FAILURE connecting to Windows box
Have you checked your smb.conf?
Make sure your workgroup and security settings are properly set. If you are working with a a computer as part of a domain, authentication requests are first passed through your domain controller, so make sure you have something similiar to:
security = domain
workgroup = WORKGROUP
You can also use the -W
option to specify the workgroup, and add DOMAIN/
before your username to specify the domain:
$smbclient -L myhost -U DOMAIN/user -W workgroup
Hope this helps!
Same issue. I had to add users to the Samba password file with
sudo smbpasswd -a
Apparently this is because the default configuration in /etc/samba/smb.conf is
security = user
passdb backend = tdbsam
I’m not using domain controllers or active directory, so I would have thought that access to the regular password file would be the default, but I guess not. It would be nice if that were clear in the documentation I found. The “smbpasswd” reference provided a hint that led to this solution.
I was having the same problem with smbclient, and I noticed that it went away when I manually selected the "Just Enable File Sharing" option on the File Sharing dialog you get after manually right-clicking on the folder you want to share.
In some Windows machines (like Windows XP) you need to add this to permit remote sharing for non guest users:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\forceguest=dword:0
or, automating using the windows xp command line:
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v forceguest /t REG_DWORD /d 00000000 /f
After that, smbclient worked without any problems with any user.
Many thanks to jethomas in http://www.techsupportforum.com/forums/f10/enable-file-sharing-via-the-command-line-133562.html