Saturday, September 17, 2011

How to access windows share from Linux machine

■ Requirement : Access windows share directory from linux system
■ OS Environment : windows, Linux, RHEL, Centos
■ Implementation Steps : 

1. Mount windows share using cifs file system : 

$mount -t cifs \\Win_IP\WIN_SHARE /mnt

Note : you should place windows IP and share directory in above & below command
put following entry in /etc/fstab

\\win_ip\winshare /mnt cifs credentials=/root/.smbpasswd 0 0

Details :

win_ip = win server name = win IP
winshare = share directory on windows.
/mnt = mounted directory on linux
/root/.smbpasswd = contains login credentials to access windows share
cifs = filesytem name

2. Manual Verification :

$smbclient -L //win_ip -U workgroup/win_user

3. Debugging Steps for cifs :

1) "dmesg -c" (clear the error log)
2) "echo 7 > /proc/fs/cifs/cifsFYI" (enabling cifs
informational/debug messages)
3) try the mount and examine the dmesg output ("dmesg")
4) capture tcpdump.

No comments:

Post a Comment