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

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 // /mnt/nk/ -o credentials=/home/nk/secret.txt

here : 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

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

No comments:

Post a Comment