Vous êtes sur la page 1sur 3

Réseaux Informatiques

1 juillet 2015 · 
[root@localhost /]# mkdir dossier
[root@localhost /]# chmod 777 dossier
[root@localhost /]# 
[root@localhost /]# ls -ldZ dossier
drwxrwxrwx. root root unconfined_u:object_r:default_t:s0 dossier
[root@localhost /]# chcon -t samba_share_t dossier
[root@localhost /]# ls -ldZ dossier
drwxrwxrwx. root root unconfined_u:object_r:samba_share_t:s0 dossier
[root@localhost /]# cd /media/RHEL_6.2\ i386\ Disc\ 1/Packages/
[root@localhost Packages]# ls samba*
samba-3.5.10-114.el6.i686.rpm samba-common-3.5.10-114.el6.i686.rpm samba-winbind-clients-3.5.10-
114.el6.i686.rpm
samba-client-3.5.10-114.el6.i686.rpm samba-winbind-3.5.10-114.el6.i686.rpm
[root@localhost Packages]# rpm -ivh samba-3.5.10-114.el6.i686.rpm
warning: samba-3.5.10-114.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
samba-common = 0:3.5.10-114.el6 is needed by samba-0:3.5.10-114.el6.i686
[root@localhost Packages]# rpm -ivh samba-common-3.5.10-114.el6.i686.rpm
warning: samba-common-3.5.10-114.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:samba-common ########################################### [100%]
[root@localhost Packages]# rpm -ivh samba-3.5.10-114.el6.i686.rpm
warning: samba-3.5.10-114.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:samba ########################################### [100%]
[root@localhost Packages]# rpm -ivh samba-client-3.5.10-114.el6.i686.rpm
warning: samba-client-3.5.10-114.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:samba-client ########################################### [100%]
[root@localhost Packages]# rpm -ivh samba-winbind-3.5.10-114.el6.i686.rpm
warning: samba-winbind-3.5.10-114.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:samba-winbind ########################################### [100%]
[root@localhost Packages]# rpm -ivh samba-winbind-clients-3.5.10-114.el6.i686.rpm
warning: samba-winbind-clients-3.5.10-114.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51:
NOKEY
Preparing... ########################################### [100%]
package samba-winbind-clients-0:3.5.10-114.el6.i686 is already installed
[root@localhost Packages]# rpm-q samba
bash: rpm-q: command not found
[root@localhost Packages]# rpm -q samba
samba-3.5.10-114.el6.i686

--------------------------- Carte Reseau ---------------------------------------

[root@localhost Packages]# ifconfig eth0 192.168.1.2/24


[root@localhost Packages]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
------------------
DEVICE="eth0"
BOOTPROTO="static"
IPADDR=192.168.1.2
NETMASK=255.255.255.0
DNS1=192.168.1.2
ONBOOT="yes"
------------------
[root@localhost Packages]# /etc/init.d/network restart
Shutting down interface eth0: Device state: 3 (disconnected)
[ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/2
[ OK ]

---------------------------- Fichier /etc/samba/smb.conf -------------------------

[root@localhost /]# vim /etc/samba/smb.conf

[globale]
workgroup = WORKGROUP
server string = Samba Server Version %v

netbios name = client

; interfaces = lo eth0 192.168.1.2/24 192.168.2.2/24 


hosts allow = 192.168.1.
---------------------------------

[partage]
comment = C'est le partage de Samba
path = /dossier
public = yes
writable = yes
browseable = yes
guest ok = yes

:wq!

--------------------------------Creation d'un user Samba-------------------------

[root@localhost /]# useradd samba


[root@localhost /]# smbpasswd -a samba
New SMB password: *********
Retype new SMB password: *********
Added user samba.
--------------------------------- Demarrage du service Samba ---------------------
[root@localhost /]# service smb restart
Shutting down SMB services: [ OK ]
Starting SMB services: [ OK ]
[root@localhost /]#

--------------------------------- Test Sur le client -----------------------------


Demarrer ---> Executer ----> \\@IP Serveur Samba

Vous aimerez peut-être aussi