mount_smbfs authentication error

While trying to mount an SMB share running on a Linux server, I get the following error:

Code:
root@FreeBSD:~ # mount_smbfs -I 192.168.2.170 -U hakim //192.168.2.170/sambashare /home/hakim/smb/
Password:
mount_smbfs: unable to open connection: syserr = Authentication error

I'm sure my password is correct. The only change I made to the SMB server was adding to config file server min protocol = NT1 to allow SMBv1 connections. I can connect with smbclient and browse the share without any problems. I don't know where to go from here. Can anyone point me in the right direction?
 
After some intense debugging and trial and error, I finally got it to work. The problem was that the authentication protocol that mount_smbfs uses seems to be a much older authentication protocol than current Samba implementations use by default.

The actual fix was to set these parameters in smb.conf on my Linux server:
Code:
lanman auth = yes
ntlm auth = yes

The server's smb.conf still needs the server min protocol = NT1 setting or mount_smbfs will fail with an error such as:
Code:
mount_smbfs: unable to open connection: syserr = RPC struct is bad

So to sum everything up, your smb.conf file on the server should look something like this:
Code:
[global]
   server min protocol = NT1
   ntlm auth = yes
   lanman auth = yes

After, restart the Samba service with: sudo service smbd restart
And then lastly, set a new Samba password with: sudo smbpasswd username

You can now try mounting with mount_smbfs again.
 
The problem was that the authentication protocol that mount_smbfs uses seems to be a much older authentication protocol than current Samba implementations use by default.
mount_smbfs(8) only supports SMBv1.

This is probably enough:
Code:
   ; Required for braindead IPMI
   client min protocol = NT1
   server min protocol = NT1
   ntlm auth = ntlmv1-permitted

After, restart the Samba service with: sudo service smbd restart
It's service samba_server restart on FreeBSD.
 
This is probably enough:
Code:
   ; Required for braindead IPMI
   client min protocol = NT1
   server min protocol = NT1
   ntlm auth = ntlmv1-permitted
Yes, I can confirm. I reset my smb.conf to default to repeat the errors I was getting; then used the above settings and it worked. I love finding even more optimized and efficient solutions for problems. Thanks yet again SirDice. I hope somebody finds this thread useful someday.
 
Back
Top