how to setup NAS drive on ubuntu desktop 16.04?

nas
8,177

Just install samba and you are ready to go

sudo apt-get update
sudo apt-get install samba

Then you'll need to edit the conf file accordingly /etc/samba/smb.conf

This should be very basic config to start with:

# Global parameters
[global]
    workgroup = HOME
    netbios name = SAMBA
    server string = Samba Server %v
    map to guest = Bad User
    log file = /var/log/samba/log.%m
    max log size = 50
    security = User

# My share
[share]
    # Path to your share
    path = /home/user/samba
    browsable = yes
    guest ok = yes
    read only = no
    create mask = 0755
Share:
8,177

Related videos on Youtube

Egytich
Author by

Egytich

Updated on September 18, 2022

Comments

  • Egytich
    Egytich almost 2 years

    i am trying to set up NAS on ubuntu desktop 16.04, Any one can help? is it possible to use desktop instead of server ,i believe it's possible any help

  • Egytich
    Egytich about 8 years
    i created a group "shrgrp" and i added user "asd" to that group, i had samba file config as u mentioned exactly except i added "valid users=@shrgrp" and "writable= yes" under [ share part] , i still get on windows client u dont have permissions, even it doesnt ask me for password, before it was asking me but after i added craste mask ,it stop asking for password , what i am missing here
  • Egytich
    Egytich about 8 years
    note i did chmod and chown as>>>>>>>>chmod -R 0770 shared chown root:smbgrp shared
  • Egytich
    Egytich about 8 years
    i think the problem with chmod and chown, as i went to the folder itself and right click , i found owner is me, and group was egy which is the computer name , which means i couldnt add this folder (which is an external hard drive) to the right group ... still need help
  • Taavi
    Taavi about 8 years
    I also forgot to mention that you need to create user for samba smbpasswd -a asd and if still have problems then try mounting the drive with proper permissions mount -o remount,uid=username,gid=shrgrp,rw /dev/sdx /shared
  • Egytich
    Egytich about 8 years
    i did the smbpasswd , as u mentioned , but still problem i think i have to do the mounting permission, But also i made another sharing in home for [rc] directory to see where is the problem, it opened with no password but when i added valid users=@shrgrp , it didnt want to open at all , it asks for password but still not working and saying permision
  • Egytich
    Egytich about 8 years
    i want the share to open with user name and password ,something i did dont remember what, result the client to ask for user name and password once i open samba , and later it open but to open the shared folder it asks for username and password but never work
  • Taavi
    Taavi about 8 years
    For testing purposes i sugest you to create a shared folder on /dev/sda1 for example /home/asd/share and give permissions accordingly chown asd:shrgrp /home/asd/share. If it works there then its a mounting issue with external drive. Also try adding writable = yes to smb.conf share section, and dont forget to resttart samba service after making changes service smbd restart