Outils pour utilisateurs

Outils du site


welcome:linux_usually:samba

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

welcome:linux_usually:samba [2021/05/23 10:58] (Version actuelle)
Ligne 1: Ligne 1:
 +<color #22b14c>**A little knowledge for configuring Samba-shares by hand**</color> {{howhard>4}} \\
  
 +
 +====== Installation ======
 +On Ubuntu 20: 
 +<code># apt-get install samba</code>
 +
 +====== Settings ======
 +===== /etc/samba/smb.conf =====
 +Good information: http://linux-training.be/networking/ch21.html \\
 +==== General settings ====
 +Let more or less as it is for a simple file sharing.
 +
 +==== Sahres ====
 +
 +
 +===== Management of users and groups =====
 +==== General ====
 +
 +  * Samba needs "own" users
 +  * But the user must exist in linux before creating the corresponding samba-user.
 +  * By removing is the same way but in the other direction: first remove the samba-user and then the unix-user
 +  * The passwords for unix and samba can be different but setting the same make the life easier (!)
 +  * Even if setting into ''etc/samba/smb.conf'', the sync of the users between unix and samba seems not to work => disable the sync into ''/etc/samba/smb.conf'' and sync by hand with the CLI
 +
 +==== Some important commands ====
 +[[welcome:linux_usually:small_tricks#users_and_groups|Small tricks]] https://wiki.guedel.eu/doku.php?id=welcome:linux_usually:small_tricks#users_and_groups
 +  * restart samba server <code># systemctl restart smbd </code>
 +  * test config of ''/etc/samba/smb.conf'' <code># testparm </code>
 +  * list the unix groups <code># cat /etc/groups</code>
 +  * remove a user from a group <code># gpasswd -d username groupname</code>
 +  * add a user into a group <code># usermod -a -G groupname username</code>
 +  * list groups from a user <code># groups username </code>
 +  * list users <code># cat /etc/passwd</code>
 +  * remove the unix-user <code># deluser username</code>
 +  * remove the samba-user <code># smbpasswd -x username</code>
 +  * create or change password of a samba-user <code># smbpasswd -a username</code>
 +  * create a unix-user <code># adduser username</code>
 +  * list the samba-users <code># pdbedit -L -v</code>
 +  * list UID and GUI of a user <code>id username</code>
 +  * add a group a set its gid <code># addgroup group_name --gid the_gid</code>
 +  * add an user a set its uid <code># adduser user_name --uid the_uid</code>
 +  * check if samba runs <code># systemctl status smbd nmbd</code>
 +  * get information about samab running <code># smbstatus</code>
 +====== Shared folders ======
 +Permissions:
welcome/linux_usually/samba.txt · Dernière modification: 2021/05/23 10:58 (modification externe)

DokuWiki Appliance - Powered by TurnKey Linux