I am trying to get samba to work properly... I have a "Movies" share (//server/Movies), I want only root account to be able to upload and delete. Guest can view "Movies" share without password/login but they cant delete/update (only view).

        path = /mnt/user/Movies
        browsable = yes
        public = yes
        writable = no
        write list = root
        guest ok = yes

I can access to Movies share as guest but when I try to add new file I get an error saying: "You need permission to perform this action"

I expected username/password to popup but it didn't, how to fix this?


When you initially access (map/mount/...) the share, you provide a username. Any further access is then performed with this username. To change the account you would need to stop the connection and restart the access.

The popup privilege-escalation pop-up you think of: here is no such functionality inside Windows.


BTW: do you know that you can map Windows usernames to Linux/Samba usernames and that it is not a good idea to give someone root access via Samba?

  • That's not necessarily true with linux and windows accessing to share by typing //IP_address/share name in explorer/konqueror, if you switch to another share (//IP_address/share2) which will need another credentials, linux/windows will ask about it. – Michal Sokolowski Jun 16 '15 at 14:38

Nothing to do with Samba, I'm afraid. You already authenticated as Guest from the Windows machine. To log in as root try to map the disk drive. That should overwrite authentication.

  • The mapping a drive as another user was a problem a few years ago with Samba. I.E. a station/host could only use one set of credentials ... the ones you logged in with. Has this problem been fixed? If not then then the only solution would be to logout and then login as root to gain the root privs. – mdpc Jul 28 '11 at 2:17
  • It doesn't have to be Samba. You cannot log in to the same smb machine with more than one set of credentials. – R.Starikov Jul 28 '11 at 4:33
  • I can access to /mnt/user/Movies without credentials... that work fine.. when I accept to copy file or write - expected credentials to popup but it did not.. how to fix this? – user88432 Jul 28 '11 at 9:25
  • To R. Starikov...what I mean is that a windows workstation already mapped to a samba share was unable to map another share on that same host using a different username which is an option on either net use or when mapping a drive via the file explorer. – mdpc Jul 28 '11 at 22:59

I'm not aware of the "physical" infrastructure behind this, but why don't you create and link account for Windows profile on your computers in samba ? This way, your users have to open a new Windows session and their correct right will be assigned to their Movies" share (//server/Movies) at the openning of the user profil in Windows.

i.e : User 1 exist in samba and have only browse and read right, the same will be applied on his Windows profil.

User 2 exist in samba and have browse, read write, etc. rights, the same will be applied on his Windows profil.


The problem is that your initial post didn't specify a security mode for Samba. You've just given the share definition. The two interact, but one is not the other.

A security mode describes HOW your clients will authenticate. This also means that, if you fail to make a working model, typically most installations will default to either guest or nobody as the user you are mapped to. If it is set up correctly, your remote credentials are mapped to a local user, a mapped user account stored in the samba back-end, or some other mapping (typically used with Active Directory), depending on how you have this set up. That mapping dictates who you present yourself as when accessing the share.

The share definition dictates what is shared to whom in the context of the security mode. Now that you have (or haven't) authenticated yourself, the resulting identity is compared to what is specified for the share definition; access to the share is granted in varying degrees based on what the definition says.

In order to fully diagnose what is happening, we would need to see the entire smb.conf file. I would suggest typing out

testparm > results.smb

and copying the contents of results.smb to your posting, so everyone can see what is happening.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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