|
Set up file sharing, with out the need to enter a password, on a local network.
The following is a guide to help you set up an open (password free) network share on your local network using Samba.
1. Install Samba: Applications > Accessories > Terminal
sudo apt-get install samba
2. Open smb.conf for editing :
gksudo /etc/samba/smb.conf
3. Change (uncomment) the following key/value pairs in the [global] section:
[global] workgroup = EXAMPLE security = user
4. Create a new section at the bottom of the file, or uncomment one of the examples, for the directory to be shared:
[share] comment = Ubuntu File Server Share path = /srv/samba/share browsable = yes guest ok = yes read only = no create mask = 0755
Explanation of values:
comment - a short description of the share. Adjust to fit your needs. path - the path to the directory to share. This example uses /srv/samba/sharename because, according to the Filesystem Hierarchy Standard (FHS), /srv is where site-specific data should be served. Technically Samba shares can be placed anywhere (example: /home/FamilyShare/) on the filesystem as long as the permissions are correct, but adhering to standards is recommended. browsable - enables Windows clients to browse the shared directory using Windows Explorer.
guest ok - allows clients to connect to the share without supplying a password.
read only - determines if the share is read only or if write privileges are granted. Write privileges are allowed only when the value is no, as is seen in this example. If the value is yes, then access to the share is read only. create mask - determines the permissions new files will have when created.
5. If it doesn't exist yet, the directory needs to be created and the permissions changed. Run the following two commands from a terminal:
sudo mkdir -p /srv/samba/share sudo chown nobody.nogroup /srv/samba/share/
NOTE: The -p switch tells mkdir to create the entire directory tree if it doesn't exist. Change the share name to fit your environment.
6. Restart the samba services by entering these two lines in terminal.
sudo restart smbd sudo restart nmbd
|