frugalware:samba
no way to compare when less than two revisions
Différences
Ci-dessous, les différences entre deux révisions de la page.
— | frugalware:samba [2018/11/17 12:53] (Version actuelle) – créée - modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ====== Configurer un réseau local entre PC sous Frugalware et PC sous Windows ====== | ||
+ | |||
+ | |||
+ | ===== I - Conditions préalables ===== | ||
+ | |||
+ | |||
+ | Nous allons voir les conditions préalables à remplir pour faire fonctionner Samba afin de voir depuis Frugalware les PC sous Windows XP et vice versa : | ||
+ | |||
+ | *1 - Sur les PC Windows XP, créer des dossiers partagés. | ||
+ | |||
+ | |||
+ | *2 - Installer Samba sur Frugalware: | ||
+ | |||
+ | |||
+ | pacman -S samba | ||
+ | |||
+ | Création du fichier / | ||
+ | |||
+ | nano / | ||
+ | |||
+ | Copiez ceci et sauvegardez: | ||
+ | |||
+ | <php> | ||
+ | # | ||
+ | # Sample configuration file for the Samba suite for Debian GNU/Linux. | ||
+ | # | ||
+ | # | ||
+ | # This is the main Samba configuration file. You should read the | ||
+ | # smb.conf(5) manual page in order to understand the options listed | ||
+ | # here. Samba has a huge number of configurable options most of which | ||
+ | # are not shown in this example | ||
+ | # | ||
+ | # Any line which starts with a ; (semi-colon) or a # (hash) | ||
+ | # is a comment and is ignored. In this example we will use a # | ||
+ | # for commentary and a ; for parts of the config file that you | ||
+ | # may wish to enable | ||
+ | # | ||
+ | # NOTE: Whenever you modify this file you should run the command | ||
+ | # " | ||
+ | # errors. | ||
+ | # | ||
+ | |||
+ | # | ||
+ | |||
+ | [global] | ||
+ | |||
+ | ## Browsing/ | ||
+ | |||
+ | # Change this to the workgroup/ | ||
+ | workgroup =MSHOME | ||
+ | # server string is the equivalent of the NT Description field server | ||
+ | server string = %h (Samba) | ||
+ | |||
+ | # Windows Internet Name Serving Support Section: | ||
+ | # WINS Support - Tells the NMBD component of Samba to enable its WINS Server | ||
+ | ; wins support = no | ||
+ | |||
+ | # WINS Server - Tells the NMBD components of Samba to be a WINS Client | ||
+ | # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both | ||
+ | ; wins server = w.x.y.z | ||
+ | |||
+ | # This will prevent nmbd to search for NetBIOS names through DNS. | ||
+ | dns proxy = no | ||
+ | |||
+ | # What naming service and in what order should we use to resolve host names | ||
+ | # to IP addresses | ||
+ | ; name resolve order = lmhosts host wins bcast | ||
+ | |||
+ | #### Networking #### | ||
+ | |||
+ | # The specific set of interfaces / networks to bind to | ||
+ | # This can be either the interface name or an IP address/ | ||
+ | # interface names are normally preferred | ||
+ | ; interfaces = 127.0.0.0/8 eth0 | ||
+ | |||
+ | # Only bind to the named interfaces and/or networks; you must use the | ||
+ | # ' | ||
+ | # It is recommended that you enable this feature if your Samba machine is | ||
+ | # not protected by a firewall or is a firewall itself. However, this | ||
+ | # option cannot handle dynamic or non-broadcast interfaces correctly. | ||
+ | ; bind interfaces only = true | ||
+ | </ | ||
+ | |||
+ | Le nom du workgroup est à changer si vous en utilisez un différent. | ||
+ | |||
+ | Vous pouvez également à décommenter la ligne security = users en enlevant le ; en début de ligne. | ||
+ | |||
+ | Surtout ne pas utiliser security = share qui ouvre le partage à tout le monde, cette option obsolète sera du reste supprimée dans les prochaines versions de Samba | ||
+ | |||
+ | |||
+ | *3 - Créer des utilisateurs samba sur le PC Frugalware avec smbpasswd : | ||
+ | |||
+ | |||
+ | Les utilisateurs doivent être déjà utilisateurs du PC Frugalware | ||
+ | |||
+ | en root, | ||
+ | |||
+ | sudo smbpasswd -a nomutilisateur | ||
+ | |||
+ | Donner ensuite le pass pour l' | ||
+ | |||
+ | *4 - Harmoniser le nom du workgroup | ||
+ | |||
+ | |||
+ | Sur les PC Windows XP dans Poste de travail/ | ||
+ | |||
+ | Sur le PC Frugalware dans le fichier / | ||
+ | |||
+ | nano / | ||
+ | |||
+ | *5 – Créer un dossier à partager sur le PC Frugalware : | ||
+ | |||
+ | |||
+ | Créer ou choisir un dossier et le partager. | ||
+ | Donner les permissions 755 (ou 775) à ce dossier. | ||
+ | En root: | ||
+ | |||
+ | chmod -R 755 / | ||
+ | |||
+ | *6 – Les PC étant allumés, depuis Frugalware utiliser Raccourcis/ | ||
+ | |||
+ | *7 - Vous pouvez aussi depuis Windows XP utiliser la Fonction Voir les Ordinateurs du réseau dans la fenêtre Favoris Réseau, mais attention cette commande peut demander un certain temps (quelquefois jusqu' | ||
+ | |||
+ | 8 – On peut aussi avoir un montage automatique des dossiers partagés au boot de Frugalware à l'aide du fstab et l' | ||
+ | |||
+ | 9- On peux encore augmenter la sécurité en ajoutant dans la section global du fichier / | ||
+ | |||
+ | hosts allow = IP1 IP2 IP3 IP4 IP5 | ||
+ | |||
+ | Avec les différentes IP des PC que tu autorises. | ||
+ | |||
+ | PS : ne pas oubliez d' | ||
+ | |||
+ | |||
+ | ===== II - Configuration avancée pour un réseau multiutilisateurs: | ||
+ | |||
+ | |||
+ | Affecter un utilisateur, | ||
+ | |||
+ | On crée les différents utilisateurs Samba et les éventuels groupe de partage où l'on veut réunir certains utilisateurs. | ||
+ | |||
+ | On crée les différents dossiers à partager et on leur donne les droits 775: | ||
+ | |||
+ | chmod -R 775 / | ||
+ | |||
+ | Ensuite on édite le fichier / | ||
+ | |||
+ | *1- Pour un dossier réservé à un seul utilisateur | ||
+ | |||
+ | [partage1nom] | ||
+ | path = / | ||
+ | available = yes | ||
+ | browsable = yes | ||
+ | public = yes | ||
+ | writable = yes | ||
+ | valid users = nom | ||
+ | create mask = 0640 | ||
+ | directory mask = 0750 | ||
+ | comment = Réservé à nom | ||
+ | |||
+ | *2- Pour un dossier réservé à plusieurs utilisateurs | ||
+ | |||
+ | [partage2nom] | ||
+ | path = / | ||
+ | available = yes | ||
+ | browsable = yes | ||
+ | public = yes | ||
+ | writable = yes | ||
+ | valid users = nom1 nom2 nom3 | ||
+ | create mask = 0640 | ||
+ | directory mask = 0750 | ||
+ | comment = Réservé à nom1, nom2, nom3 | ||
+ | |||
+ | |||
+ | *3- Pour un dossier réservé à un groupe d' | ||
+ | |||
+ | |||
+ | [partage3nom] | ||
+ | path = / | ||
+ | available = yes | ||
+ | browsable = yes | ||
+ | public = yes | ||
+ | writable = yes | ||
+ | valid users = +groupepartage | ||
+ | create mask = 0640 | ||
+ | directory mask = 0750 | ||
+ | comment = Dossier du groupe groupepartage | ||
+ | |||
+ | *4- Pour voir les homes des différents utilisateurs | ||
+ | (pour écrire modifier l' | ||
+ | |||
+ | [homes] | ||
+ | | ||
+ | | ||
+ | valid users = %S | ||
+ | | ||
+ | |||
+ | *5- Pour avoir un dossier partagé " | ||
+ | |||
+ | map to guest = bad user | ||
+ | guest account = nobody | ||
+ | |||
+ | et ensuite créer un dossier " | ||
+ | |||
+ | [pub] | ||
+ | path = /path/pub | ||
+ | browseable = yes | ||
+ | guest ok =yes | ||
+ | read only = yes | ||
+ | |||
+ | |||
+ | |||
+ | ===== Sources ===== | ||
+ | |||
+ | |||
+ | L' | ||
frugalware/samba.txt · Dernière modification : 2018/11/17 12:53 de 127.0.0.1