Samba R/W share for nobody

Here’s a little trick you might want to apply to your linux-based-filesharing server,

Enable access from everyone (windows) without user/pass confirmation, you need to put these setting in global:

map to guest = bad user
guest account = nobody
usershare allow guests = yes

and below settings in share folder:

browsable = yes
guest ok = yes
public = yes

for write access, put below setting:

read only = no

maybe you need to force the creation of new file uploaded by client to be accessible for everyone, you could add below settings:

create mask = 0777
directory mask = 0777

and to simplify editing from your server so you don’t need to login as nobody/root, put this settings:

force user = stev
force group = stev

Finally, my minimalist-full setting of smb.conf:

[global]
map to guest = bad user
guest account = nobody
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
usershare allow guests = yes
[File4fun]
comment = File4fun
path = /media/other/fun/fun
browsable = yes
guest ok = yes
read only = no
public = yes
create mask = 0777
directory mask = 0777
force user = stev
force group = stev

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s