# - bof - # :Step 1 # - - # # - Install samba server & create samba user - # :a # - - # # - Install samba server - # sudo apt install tasksel -y; sudo tasksel install samba-server; :b # - - # # - Terminal: Create samba user - # # - Create user without home and with no shell to login - # # - (user won't appear in login user list when linux starts) - # # - Use just one command, the second is the same without --uid - # sudo adduser smbguest --uid 992 --shell=/bin/false --no-create-home; :Step 2 # - - # # - Add samba user to sambashare group - # sudo usermod -a -G sambashare smbguest; sudo usermod -a -G sambashare is_derayo; :Step 3 # - - # # - Create a samba & admin password - # sudo smbpasswd -a smbguest; sudo smbpasswd -a is_derayo; :Step 4 # - - # # - Enable samba & admin user - # sudo smbpasswd -e smbguest; sudo smbpasswd -e is_derayo; :Step 5 # - - # # - Check samba & admin user group - # cat /etc/group; tail /etc/group; cat /etc/group | grep smbguest; cat /etc/group | grep is_derayo; :Step 6 # - - # # - Check samba & admin on password file - # cat /etc/passwd; tail /etc/passwd; cat /etc/passwd | grep smbguest; cat /etc/passwd | grep is_derayo; :Step 7 # - - # # - Modify samba configuration file - # # - For full linux instalation in terminal - # sudo gedit /etc/samba/smb.conf # - For sever's terminal - # sudo vim /etc/samba/smb.conf workgroup = L_IS wins support = yes name resolve order = lmhosts host wins bcast # - For full linux installation only - # # - Please don't use this line in a dedicated server - # # - If this line does not appear in /etc/samba/smb.conf file, add it in Misc paragraph - # ############ Misc ############ security = user # - These lines go at the end of the /etc/samba/smb.conf file - # [ToShare-FullAccess] comment = ToShare-FullAccess to everybody in the net path = /home/Data/Documents/ToShare-FullAccess writeable = yes browseable = yes guest ok = no create mask = 0777 valid users = is_derayo, smbguest [ToShare-JustRead] comment = ToShare-JustRead to everybody in the net path = /home/Data/Documents/ToShare-JustRead writeable = no browseable = yes guest ok = no create mask = 0755 valid users = is_derayo, smbguest :Step 8 # - - # # - Restart samba service - # sudo systemctl enable smbd.service nmbd.service; sudo systemctl start smbd.service nmbd.service; sudo systemctl restart smbd.service nmbd.service; # - eof - #