Monday, August 2, 2010

RHCE study notes: Samba configure in RHEL 5


Step by step for configuring Samba server in server side and test.
a:# yum install samba*                              //install samba from yum database
b:  # vim /etc/samba/samba.conf          //configuring the samba.conf
[global]
workgroup=MYGROUP                              //setting for user group
server string=Samba Server Version  //describe samba server
hosts allow = 127. 192.168.0.0/24
[myshare]
comment=myshare
path= /folder
guest ok=yes
writable=yes
public=no
browserable=yes                     //allow all use access
[printers]
printerable=yes                    //printer setting
c: # service smb restart      // restart services
# chkconfig smb on
d:# smbclient -L 192.168.0.11         //test smb
# smbpasswd -a user1                //user1 must already been setup in system
# smbclient -U user1 //station11.example.com/myshare
e: Selinux setting up
—-SElinux deny—-
# ls -LZ
# chcon -R -t samba_share_t /folder
f: mount smb
# mount -t cifs //192.168.0.11/myshare /mnt/smb -o user=user1