Q : Comment installer le serveur Samba pour partager des fichiers/dossiers ?
sudo apt-get install samba
sudo apt-get install smbfs
Q : Comment ajouter/éditer/supprimer des utilisateurs réseau ?
smbpasswd -a system_username
sudo gedit /etc/samba/smbusers
system_username = "network username"
sudo smbpasswd -a system_username
sudo smbpasswd -x system_username
Q : Comment partager un dossier en lecture seule (Authentification activée) ?
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
username map = /etc/samba/smbusers
sudo testparm
sudo /etc/init.d/samba restart
Q : Comment partager un dossier en lecture/écriture (Authentification activée) ?
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
username map = /etc/samba/smbusers
...
# 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
...
# 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 = yes
sudo testparm
sudo /etc/init.d/samba restart
Q : Comment partager un dossier en lecture seule pour un groupe (Authentification activée) ?
sudo mkdir /home/group
sudo chmod 777 /home/group/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
username map = /etc/samba/smbusers
[Group]
comment = Group Folder
path = /home/group
public = yes
writable = no
valid users = system_username1 system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart
Q : Comment partager un dossier en lecture/écriture pour un groupe (Authentification activée) ?
sudo mkdir /home/group
sudo chmod 777 /home/group/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
username map = /etc/samba/smbusers
[Group]
comment = Group Folder
path = /home/group
public = yes
writable = yes
valid users = system_username1 system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart
Q : Comment partager un dossier en lecture seule à tout le monde (Authentification activée) ?
sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
username map = /etc/samba/smbusers
[public]
comment = Public Folder
path = /home/public
public = yes
writable = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart
Q : Comment partager un dossier en lecture/écriture à tout le monde (Authentification activée) ?
sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
username map = /etc/samba/smbusers
[public]
comment = Public Folder
path = /home/public
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart
Q : Comment partager un dossier en lecture seule à tout le monde (Authentification désactivée) ?
sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = share
[public]
comment = Public Folder
path = /home/public
public = yes
writable = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart
Q : Comment partager un dossier en lecture/écriture à tout le monde (Authentification désactivée) ?
sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = share
[public]
comment = Public Folder
path = /home/public
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart