Ubuntu server: Easy Samba Share in Ubuntu Server

Reference link: https://help.ubuntu.com/community/How%20to%20Create%20a%20Network%20Share%20Via%20Samba%20Via%20CLI%20(Command-line%20interface/Linux%20Terminal)%20-%20Uncomplicated,%20Simple%20and%20Brief%20Way!


Use samba server installed on your Ubuntu server allow you to easily share a folder from Ubuntu Linux with other network users.

1. Install Samba Server:

sudo apt-get update
sudo apt-get install samba

2. Set a password for a user in Samba. This is the user name password combination you will use when you try to access the Samba share from the network. Such as from your Windows PC.

sudo smbpasswd -a <user name>

3. Create a folder to be shared on Samba:

mkdir /home/<user name>/ShareUbuntu

Note that you have to have permission to that folder you want to shared.

4. Edit the Samba Configuration file:

sudo nano /etc/samba/smb.conf

5. Add the following lines to the end of the config file:

[ShareUbuntu]
path = /home/<user name>/ShareUbuntu
valid users = <user name>
read only = no

valid users is list of the users you added Samba password in step #2.

6. Restart the Samba server:

sudo service smbd restart

Now you can access this share folder called ShareUbuntu from inside of your network.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>