Ubuntu 14 SAMBA Standalone Server

This guide details how to setup a SAMBA standalone server on Ubuntu 14.x

  1. Install Ubuntu selecting the OpenSSH and SAMBA packages when prompted.
  2. If you’re installing SAMBA on an existing system run:
    # sudo apt-get install -y samba
  3. Update system:
    # sudo apt-get update && apt-get upgrade -y
  4. Rename default /etc/samba/smb.conf
    # sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.orig
  5. Create a new /etc/samba/smb.conf as follows, replace WORKGROUP with your own setting:
    [global]
        workgroup = WORKGROUP
        server string = Samba Server Version %v
        security = user
        passdb backend = tdbsam
    
        local master = yes
        preferred master = yes
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
        use sendfile = true
    
        log file = /var/log/samba/log.%m
    
    #============================ Share Definitions ==============================
    
    [samba]
        comment = SAMBA Data
        path = /data/samba
        writeable = yes
        force user = samba
        force group = samba
        force directory mode = 0770
        force create mode = 0660
        directory mode = 0770
        create mode = 0660
    
  6. Create system user and set SAMBA password:

    # sudo groupadd samba
    # sudo useradd -g samba samba
    # sudo smbpasswd -a samba
    	(enter whatever password you prefer)
  7. Create data directory:
    # sudo mkdir -p /data/samba
    # sudo chown samba:samba /data/samba
    # sudo chmod 0770 /data/samba
  8. Restart SAMBA services:
    # sudo service nmbd restart
    # sudo service smbd restart
  9. You should then be able to browse to the server (ie. open Explorer and enter \\) from a Windows PC. Enter username “samba” and the password you set for that user when prompted.

Leave a Reply

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

*
*
Website