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

Is it possible to have a samba share read only for guests, and read write for authenticated users?

If I put guest ok on an share then I am not prompted for a password, and effectively logged as guest with read only rights. But I want to be authenticated so that I can also write.

Could anyone provide a sample smb share stanza to achieve this?

share|improve this question

1 Answer 1

Edit /etc/samba/smb.conf

# command line
sudo -e /etc/samba/smb.conf

# graphical
gksu gedit /etc/samba/smb.conf

Add in the write list paramter to your share definition, add in your list of users allowed write access.

write list = user1 user2 user3

You can use read only as well

read only = guest nobody

So ...

comment = Ubuntu Share
path = /your/samba/share
browsable = yes
guest ok = yes
read only = guest nobody
write list = user1 user2 user3
create mask = 0755

If you need finer grain of control, you can use acl (access control lists) on the server.

share|improve this answer

Your Answer


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.