Vous n'êtes pas identifié(e).
L'icône rouge permet de télécharger chaque page du wiki visitée au format
PDF et la grise au format ODT →
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
utilisateurs:hypathie:tutos:samba [13/09/2014 14:38] Hypathie [Installation de samba serveur] |
utilisateurs:hypathie:tutos:samba [13/09/2014 14:44] Hypathie [Introduction] |
||
---|---|---|---|
Ligne 25: | Ligne 25: | ||
* __Le nom du système hôte sur lequel va être installé samba__ : | * __Le nom du système hôte sur lequel va être installé samba__ : | ||
<code user>hostname</code> | <code user>hostname</code> | ||
- | <code>debian-1</code> | + | <code>debian-serveur</code> |
>Attention à la confusion entre serveur (samba ou autre) installé sur un système qui reste malgré tout "l'hôte", on va dire de ce système. | >Attention à la confusion entre serveur (samba ou autre) installé sur un système qui reste malgré tout "l'hôte", on va dire de ce système. | ||
Ligne 32: | Ligne 32: | ||
<code> | <code> | ||
<...> | <...> | ||
- | inet 192.168.0.15/24 brd 192.168.0.255 | + | 192.168.0.14/24 brd 192.168.0.255 |
<...> | <...> | ||
</code> | </code> | ||
Ligne 39: | Ligne 39: | ||
* __L'utilisateur principal du système__ : | * __L'utilisateur principal du système__ : | ||
<code root>echo $USER</code> | <code root>echo $USER</code> | ||
- | <code>first-user</code> | + | <code>hypathie</code> |
====Pré-requis ==== | ====Pré-requis ==== | ||
Ligne 45: | Ligne 45: | ||
===Création d'un compte user pour le partage de fichier=== | ===Création d'un compte user pour le partage de fichier=== | ||
- | <code root>addgroup --system hypathie</code> | + | <code root>addgroup --system sharing</code> |
===Création d'un utilisateur système correspondant à l'utilisateur samba === | ===Création d'un utilisateur système correspondant à l'utilisateur samba === | ||
- | <code root>adduser --system hypathie --ingroup hypathie</code> | + | <code root>adduser --system sharing --ingroup sharing</code> |
+ | |||
+ | ===Mot de passe système unix === | ||
+ | <code root>passwd sharing</code> | ||
===Création d'un fichier partageable === | ===Création d'un fichier partageable === | ||
- | <code root>mkdir /home/hypathie/public</code> | + | <code root>mkdir /home/sharing/public</code> |
- | ===Mise en place des droits sur le répertoire et ses fichiers partageable === | + | ===Mise en place des droits sur le répertoire et ses fichiers partageables === |
- | <code root>chown -R hypathie:hypathie /home/hypathie/</code> | + | <code root>chown -R sharing:sharing /home/hypathie/</code> |
- | <code root>chmod -R 770 /home/hypathie/</code> | + | <code root>chmod -R 770 /home/sharing/</code> |
- | > Pour donner les droits récursivement à /home/hypathie/public | + | > Pour donner les droits récursivement à /home/sharing/public |
Ligne 363: | Ligne 366: | ||
===Édition du fichier /etc/samba/smb.conf === | ===Édition du fichier /etc/samba/smb.conf === | ||
Il doit ressembler à cela. | Il doit ressembler à cela. | ||
- | <code>########## Printing ########## | + | <code>[printers] |
- | + | comment = All Printers | |
- | # If you want to automatically load your printer list rather | + | browseable = yes |
- | # than setting them up individually then you'll need this | + | printable = yes |
- | ; load printers = yes | + | writeable = no |
- | + | guest ok = no | |
- | # lpr(ng) printing. You may wish to override the location of the | + | read only = yes |
- | # printcap file | + | create mask = 0700 |
- | ; printing = bsd | + | |
- | ; printcap name = /etc/printcap | + | |
- | + | ||
- | # CUPS printing. See also the cupsaddsmb(8) manpage in the | + | |
- | # cupsys-client package. | + | |
- | printing = cups | + | |
- | printcap name = cups | + | |
- | + | ||
- | use client driver = yes | + | |
- | + | ||
- | [printers] | + | |
- | browseable = no | + | |
- | printable = yes | + | |
- | writable = no | + | |
- | guest ok = yes | + | |
- | comment = All Printers | + | |
- | public = yes | + | |
- | printer admin = root | + | |
- | + | ||
- | [print$] | + | |
- | guest ok = no | + | |
- | comment = Printer Drivers | + | |
- | writable = no | + | |
- | path = /etc/samba/drivers | + | |
- | write list = root @ntadmin | + | |
+ | # Windows clients look for this share name as a source of downloadable | ||
+ | # printer drivers | ||
+ | [print$] | ||
+ | comment = Printer Drivers | ||
+ | path = /var/lib/samba/printers | ||
+ | browseable = yes | ||
+ | writeable = no | ||
+ | read only = yes | ||
+ | guest ok = no | ||
+ | # Uncomment to allow remote administration of Windows print drivers. | ||
+ | # You may need to replace 'lpadmin' with the name of the group your | ||
+ | # admin users are members of. | ||
+ | # Please note that you also need to set appropriate Unix permissions | ||
+ | # to the drivers directory for these users to have write rights in it | ||
+ | write list = root, @lpadmin | ||
</code> | </code> | ||