Sunday, September 2, 2012

[Guide] How to install Samba Server on Ubuntu


Ubuntu IconIf you are looking to share files between your Ubuntu and Windows computers, your best option may be to use Samba file sharing.

The following guide will show you how to install Samba Server in order to share files between your Windows and Ubuntu computers.

To install, open 'terminal' and enter the following command:
sudo apt-get install samba smbfs
Once this process completes you will have Samba installed. Next you need to configuire it to make it accessible.

Run the following command to open the configuration file
sudo gedit /etc/samba/smb.conf
Find the following section:
####### Authentication #######
# “security = user” is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
# in the samba-doc package for details.
; security = user
Remove the ';' from the 'security = user' line and add the following below it:
security = user
username map = /etc/samba/smbusers
This will make Samba use the smbusers file to look up the user list


Create a Samba User
  1. Run the smbpasswd utility to create a password for your samba user:sudo smbpasswd -a <username>
  2. Add that user to the smbusers file:sudo gedit /etc/samba/smbusers
  3. Add the following line to connect the username with the user you want to give access to<username> = “<username>” 
You can now create Samba shares and give access to users by listing them here.

If you have any issues or easier methods to achieve this, leave us a comment below.
DJRipster Web Developer

Morbi aliquam fringilla nisl. Pellentesque eleifend condimentum tellus, vel vulputate tortor malesuada sit amet. Aliquam vel vestibulum metus. Aenean ut mi aucto.