How to create network sharing in Ubuntu


Create a Static IP adress

I like to give it a static ip address as I believe is easier.

1. Click on Networks Devices (It’s on the top of the screen with two arrows one going up the other down).

2. Click Edit connections.

3. Highlight your network connection and then click Edit.

4. Click IPv4 Settings tab.

5. Choice method as Manual.

6. Click Add, then put your network settings.

7. Click Save.


Samba installation and setup

1. Go to Terminal and type sudo bash

2. Type sudo apt-get install samba

3. When finish we need configure the smb.conf file

4. Type gksudo gedit /etc/samba/smb.conf

5. Edit the following:
in [global] section add the line below:
usershare owner only = false

at the bottom of the file add the following section:
comment = Ubuntu File Server Share
path = /srv/samba/share
browsable = yes
guest ok = yes
read only = no
create mask = 0755


Creating and changing permissions

Still in terminal type the following:

sudo mkdir -p /srv/samba/share
sudo chown nobody.nogroup /srv/samba/share


Restart Samba Services

sudo restart smbd
sudo restart nmbd


Sharing folders with Mac and Windows

1. Type sudo smbpasswd -a [username], replacing “username” with your own username. Press Return to run the command.

NOTE: You can find out what your username is by typing whoami into the Terminal and then pressing Return

2. Enter your password when prompted with “[sudo] password for username:” and press Return again.

3. When prompted with “New SMB password:”, enter the password that you would like to use to access the shared folder and then press Return. You can leave the password blank if you like, which will allow anyone to access the shared folder.

4. When prompted with “Retype new SMB password:”, enter the password that you just entered and then press Return


Finding Ubuntu shared folders in a Mac or Windows

Click on your desktop and from the top menu bar, select GO > Network
Alternatively, open your hard drive and select “Network” from the side bar
Find “[server]” and open it
Usually, you will see a small almost unnoticeable bar at the top saying “You are logged in as Guest”
If it requires a password, select the button on the right of that bar which says “Login as…”
Enter username and password
Save it in your keychain if you don’t want to have to do this every time
Now you should be able to open the folders

Windows 7/Vista:
Click “Start” and on Search type the servername {e.g \\ or \\computername\sharename}

When prompted for username and password enter user and password

Windows XP:
Click “Start” and then click Run

Type the computername {e.g \\ or \\computername\sharename} press OK

When prompted for username and password enter user and password


One thought on “How to create network sharing in Ubuntu

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s