Friday, May 23, 2014

Simple Samba Server Configuration in Ubuntu Server 12.04 LTS

Samba server is mainly used for file sharing in cross platform environment. You can find the simple following steps to make Samba file server configuration in Ubuntu Server 12.04 LTS.
Step 1: Install the samba package from online repository
            sudo apt-get install samba
Step 2: Edit the configuration file /etc/samba/smb.conf
            workgroup = EXAMPLE
            This EXAMPLE can be your domain name or some desirable name
Step 3: Make or add the following changes in the bottom of the file. Use bottom of the file for improving your readability. However, you can add these lines in any portion of the configuration file (for advanced users- generally not recommended for normal users).
    comment = Ubuntu File Server Share
    path = /srv/samba/share
    browsable = yes
    guest ok = yes
    read only = no
    create mask = 0755
    valid users = employee
Step 4: Make a directory
            mkdir -p /srv/samba/share
Step 5: Restart the following services
            sudo restart smbd
            sudo restart nmbd
Step 6: Create users only to access samba share

            useradd -s /sbin/nologin employee
            smbpasswd -a employee
            smbpasswd -e employee

To access samba via command line
smbclient // -U employee