Saturday, August 4, 2012

How to Mount Windows Share with CentOS

1. Install below package
#yum install samba-client
#yum install cifs-utils
2. create a file to keep/save you windows password in that. (you can also pass them directly on shell)
cd /home/nk
vim secret.txt
username=Domain\windowsUsername
password=YourPassowrForWindowsDomain

save and exit by :wq

4. make a directory where you want to mount the windows share folder
mkdir /mnt/nk

5.pass the below command to mount the windows shared folder to Centos folder
mount -t cifs //192.168.1.14/share /mnt/nk/ -o credentials=/home/nk/secret.txt

here : 192.168.1.14 is the windows machine IP
           "share" is the name of the folder you want to share(make sure you have access to this)

6. check that folder is mounted by "mount" command

Or
 mount -t cifs //192.168.1.14/share /mnt/nk/ -o -o username=#####,password=######
 
If the machine is in domain
mount -t cifs //192.168.1.14/share /mnt/nk/ -o -o username=DomainName/xxxx,password=xxxx



No comments:

Post a Comment