Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running smbclient on Ubuntu, trying to connect to a Windows box, and I'm getting "session setup failed: NT_STATUS_LOGON_FAILURE".

I've verifed that I can ping the box and telnet to ports 139/445, so I'm pretty sure that it's not a firewall issue. And my client says that they can connect to this Windows box from another Windows box with the userid/password combination without issue. Also, this box can connect via smbclient to other Windows boxes that this client has.

Any other ideas for why this isn't working?

share|improve this question
up vote 13 down vote accepted

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

Hope this helps!

share|improve this answer
    
Turns out adding the domain did the trick. Apparently some versions of Windows require the domain and others don't? But, thanks! – David Jaquay Mar 3 '12 at 19:03
    
note that the 'security = domain' bit is unnecessary here. Apart from specifying the workgroup in smb.conf, you can also specify it on the command line to smbclient. – jelmer Mar 3 '12 at 20:09
    
Yes, the -W option to smbclient is what I used to get it working. – David Jaquay Mar 5 '12 at 2:16
5  
DOMAIN/username should also work. – Calmarius Apr 5 '13 at 15:36
1  
You may also use smbclient with the -W argument. – Andre Miras Jan 27 '15 at 17:09

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.

share|improve this answer

This may be due to following reason:

  1. If valid users is provided in smb.conf cross check the smbpasswd
  2. Check the hosts file.
share|improve this answer
    
Not sure why this got down-voted. This answer pointed me to smbpasswd which is what I needed to use to set credentials when I was getting this same error. – Rick Chatham Oct 5 '15 at 20:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.