Samba: How to share files for your LAN without user/password

Samba: How to share files for your LAN without user/password

This is a quick and dirty method to set samba to allow read-only file sharing  as guest (without be prompted for a password).

Because users won’t be prompted for a user/password, this is meant to be installed in a LAN where all hosts and users are trusted.

I’m assuming you’ve already installed samba via your favorite method.

Because we are going to make samba security insecure, make sure only your local network can access samba service.

To do so, open and edit /etc/samba/smb.conf

and set interfaces to lo and your local network interface.

interfaces = lo eth1
bind interfaces only = true

Next, change the samba default security variable: security and make sure it is set to share instead of user and that guest account is enabled:

security = share
...
...
guest account = nobody

Next,  we can create a share to be accessible to guest users:

[Guest Share]
        comment = Guest access share
        path = /path/to/dir/to/share
        browseable = yes
        read only = yes
        guest ok = yes

 

Save the file and restart samba.

 

Author: Helicopter Jeff

I'm a vinyl decal cutting and designing, Astrophotography and general photography capturing, RC helicopter/quad copter pilot, Arduino and Raspberry Pi hardware/software developer, network, scripting and troubleshooting ninja living in the metro NY area. I am passionate about my hobbies so much I do them for a living. There's nothing better than getting paid to do what you love.

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