Friday, January 19, 2018

mounting Windows share folder in linux using cifs


In this post i am going to tell you how to mount windows share folder \\windows_server\sharefolder in Linux server using cifs protocol.

i assume that you have already created share folder \\windows_server\sharefolder and granted access to user1

create password file for user1 to protect the credentials from the cifs mounting visible to everyone and set permission to root only with 700.


Install sudo yum install cifs-utils rpm

edit /etc/fstab and add below line

//windows_server/sharefolder /win_share_folder cifs credentials=/root/passwords/cif_passwd,uid=user1_uid 0 0

mount -a

now you should be able to see the windows share folder.

while mounting i passed uid=user1_uid. if you don't specify that option only root user can create/copy/delete files in the /win_share_folder.

No comments:

Post a Comment