Tuesday, April 3, 2012

Mount Remote Windows Folder with RHEL 5 Linux

Login into linux using root user

Create the required mount point in linux
#mkdir -p /mnt/win_folder   
mount the remote folder
#mount -t cifs //windows_machine_ip_or_name//shared_folder -o username=test,password=test123 /mnt/win_folder

-t cifs - file system type to be mount
-o : are options passed to mount command, here i have passed 2 options username and password
//windows_machine_ip_or_name//shared_folder - windows/shared folder
 /mnt/win_folder - linux mount point

Configure the system to automount while starting

add entry into /etc/fstab
Open file /etc/fstab using vi text editor:# vi /etc/fstabAppend line
//windows_machine_ip_or_name//shared_folder /mnt/win_folder cifs username=test,password=test123 0 0

No comments: