How to install Samba Server for files/folders sharing service
sudo apt-get install samba smbfs
How to add/edit/delete network users
sudo smbpasswd -a system_username
gksudo gedit /etc/samba/smbusers
- Insert the following line into the new file
system_username = "network username"
sudo smbpasswd -a system_username
sudo smbpasswd -x system_username
sudo smbpasswd -e system_username
sudo smbpasswd -d system_username
- By Default network users are disabled after adding them, make sure you run the enable network user command above.
How to share home folders with read only or read/write permission (Authentication=Yes)
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gksudo gedit /etc/samba/smb.conf
...
; security = user
...
- Replace with the following lines
security = user
username map = /etc/samba/smbusers
- Remove the ; in front of the following lines (there will text in between explaining what they do):
;[homes]
;comment = Home Directories
;browseable = no
;valid users = %S
;writable = yes
- If you want other network users to be able to edit to the folder then change
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
; writable = no
- Replace with the following lines
writable = yes
sudo testparm
sudo /etc/init.d/samba restart
0 comments:
Post a Comment