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
Asked
Active
Viewed 8,414 times
1 Answers
2
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

Taavi
- 686
-
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 Jun 22 '16 at 20:04
-
note i did chmod and chown as>>>>>>>>chmod -R 0770 shared chown root:smbgrp shared – Egytich Jun 22 '16 at 20:08
-
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 – Egytich Jun 22 '16 at 20:28
-
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 permissionsmount -o remount,uid=username,gid=shrgrp,rw /dev/sdx /shared
– Taavi Jun 22 '16 at 22:17 -
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 Jun 22 '16 at 23:23
-
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 – Egytich Jun 22 '16 at 23:43
-
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 addingwritable = yes
to smb.conf share section, and dont forget to resttart samba service after making changesservice smbd restart
– Taavi Jun 23 '16 at 07:59