How to Install Samba Server on Ubuntu

April 7, 2013 in Services

sudo mkdir /sharefolder

sudo chown -R nobody:nogroup /sharefolder/

sudo chmod 755 /sharefolder/

now lets restart the samba server

sudo /etc/init.d/samba restart

Normally at that point you should be able to access this share folder from Linux or Windows without any user credentials

NOTE!!! in older versions of samba in order to restart samba server you need to run “sudo /etc/init.d/smbd restart”

Setup Private Folder:

Next lets create a private folder only for Unix users

lets first create the a user named smbuser:

sudo useradd smbuser

lets create a password for smbuser that will be used for accessing the samba share

sudo smbpasswd -a smbuser

now the directory for that user:

sudo mkdir /smbuserdir

sudo chown -R smbuser /smbuserdir/

sudo chmod 755 /smbuserdir/

edit the samba config again:

sudo nano /etc/samba/smb.conf

add the following:

#

[smbuserdir]
comment = This is a folder accessible from smbuser

path = /smbuserdir
browsable = yes
guest ok = no
read only = no
create mask = 0755

now restart samba deamon

sudo /etc/init.d/samba restart

In order to access the share folder you need to use for username: “smbuser” and for password the password you create when you add the user.

Have Fun!

A video Tutorial is coming soon!

Pages: 1 2