Ubuntu – Any way to restore connect to windows share as a different user

networkingsamba

When I upgraded to Ubuntu 13.04 the file manager lost the ability to connect to windows shares as a specific user(from 'connect to server') from the file manager. I could be connected to z share as one user and x share as another, but now connect to server offers no place to add credentials as it used to. When I try without credentials, I get an error that says "UNABLE TO ACCESS LOCATION – FAILED TO MOUNT WINDOWS SHARE – PERMISSION DENIED". I find screenshots where it's supposed to prompt me for a username and password, But I never get it. Just an error. Is there something that maybe carried over from the previous version? Should I delete ~/.nautilus? or something?

Best Answer

If you open up your /etc/samba/smb.conf file you should see at the bottom the share definition. Generically it looks something like this:

[share-name]
comment = 
path = /media/[some-name]
read only = No
guest ok = yes

What you want to do is add a "force user" line to that share definition so that the remote user appears to be you:

[share-name]
comment = 
path = /media/[some-name]
read only = No
force user = [your-user-name]
guest ok = yes

Then restart samba:

sudo service smbd restart

Official sources: http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#FORCEUSER

Related Question