Samba is a suite of utilities that allows your Linux to share files and other resources, such as printers, with Windows.
Package :- samba
Service :- smb
Server Settings
Samba Configuration in RHEL with Authantication & when Selinux is Disabled.
1. Install Samba Package
#yum install samba*
2. Create a Directory name “share”
#mkdir /share
3. Open Configuration file of samba
#vim /etc/samba/smb.conf
--change workgroup name
workgroup=SMBGROUP
host allow=127. 192.168.1.
-- go to last line and type
[share]
comment=share by samba
path=/share
writable=yes
validusers=root
browseable=yes
createmask=775
---save and quit
:wq
#service smb restart
#chkconfig smb on
4. Change containt of share directory
#chcon –t samba_share_t share
#ls –Z --- to show listed directory containt and properties
#smbpasswd –a root
give root password -----------
confirm password -----------
5. To check ur configuration in ok or not
#smbclient //192.168.1.17/share –U root
give root password -------
6. Give permission on share directory
#chmod 777 /share
When Selinux is enabled then above configuration is same &
below r the steps to enable samba service in selinux.
1. To check selinux is enforce or disabled
#getenforce
2. If enable then
#getsebool –a |grep samba
#setsebool –P samba_enable_home_dirs on
#setsebool –P samba_export_all_ro on
#setsebool –P samba_export_all_rw on
#ls –Z
#service smb restart
#chkconfig smb on
In Client side:
Start--->Run-->Type
\\192.168.1.17 Then,
Click ok
give user name = root &
In password = password of root
click ok
then,..
Enjoy it have a great day…
No comments:
Post a Comment