May 10, 2015

Ubuntu Server - SAMBA

Assuming you have preinstall the Ubuntu server with the following options :-
  • OpenSSH.
  • Samba File Server.

Follow these steps-by-steps :-

  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo nano /etc/network/interfaces
    • static
    • address 192.168.4.200
    • netmask 255.255.255.0
    • gateway 192.168.4.1
    • network 192.168.4.0
    • broadcast 192.168.4.255
    • dns-nameservers 202.188.0.133 202.188.1.5
  4. sudo fdisk -l
  5. sudo nano /etc/fstab
    • /dev/sdb1 /media/sdb1 ntfs
    • /dev/sdc1 /media/sdc1 ntfs
  6. sudo mkdir /media/sdb1
  7. sudo mkdir /media/sdc1
  8. sudo blkid (note the HDD's UUID displayed).
  9. sudo mount -t ntfs /dev/sdb1 /media/sdb1
  10. sudo mount -t ntfs /dev/sdc1 /media/sdc1
  11. sudo nano /etc/samba/smb.conf
    • [MUSIC]
    • Comment = My Music Folder
    • path = /media/sdb1
    • browsable = yes
    • guest ok =  yes
    • read only = no
    • read list = @[username]
    • write list = @[username]
  12. sudo restart smbd
  13. sudo restart nmbd
  14. sudo iptables -A INPUT -p tcp --dport ssh -j ACCEPT
  15. sudo sh -c "iptables-save > /etc/iptables.rules"
  16. sudo nano /etc/network/interfaces
    • prep-up iptables-restore < /etc/iptables.rules

No comments:

Post a Comment