Powered By Blogger

Thursday, October 13, 2011

Sharing folder from RHEL5 machine to Windows machine

Configuring Samba service on RHEL5 machine

Create a share folder in RHEL5 machine which u want to share with Windows machine.

Check Linux machine for the samba packages whether installed or not.

[root@nav1 ~]# rpm -qa *samba*
sblim-cmpi-samba-0.5.2-31.el5_2.1
sblim-cmpi-samba-test-1-31.el5_2.1
samba-3.0.33-3.7.el5
samba-client-3.0.33-3.7.el5
sblim-cmpi-samba-devel-1-31.el5_2.1
system-config-samba-1.2.41-3.el5
samba-common-3.0.33-3.7.el5
samba-swat-3.0.33-3.7.el5
You have new mail in /var/spool/mail/root

[root@nav1 ~]# service smb status
smbd (pid 3635 3068 3029) is running...
nmbd (pid 3032) is running...
[root@nav1 ~]#

[root@nav1 ~]# useradd samba -d /home/samba
[root@nav1 ~]# smbpasswd -a samba
New SMB password:
Retype new SMB password:
Added user samba.
[root@nav1 ~]# cat /etc/samba/smb
smb.conf  smbusers 
[root@nav1 ~]# cat /etc/samba/smb.conf

[windows]
        path = /u01/windows
        writeable = yes
;       browseable = yes
        valid users = az, nv, samba
[root@nav1 ~]#

After doing any changes to smb.conf file, please restart smb service to take effect of the changes as below.

[root@nav1 ~]# service smb restart
Shutting down SMB services:                                [  OK  ]
Shutting down NMB services:                                [  OK  ]
Starting SMB services:                                     [  OK  ]
Starting NMB services:                                     [  OK  ]
[root@nav1 ~]#

Now go to Windows machine and try to Map the network drive using the RHEL5 machine IP and share name and Samba username/password.
It should work fine.

Reference:
http://mars.netanya.ac.il/~unesco/cdrom/LDP/Samba/HTML_FORMAT/SMB-HOWTO.html#toc6


Regards,
Navaneeth

No comments:

Post a Comment