Tuesday, December 19, 2017

Mounting Windows share on Linux system

Steps to share the Windows shared partitions to a Linux system:



Assume below Windows share have been exported from your Windows systems:
\\10.128.35.35\filevaults - Pdmlinkm/WeiKyowxAj

Now to use these on a Linux system, follow below steps:

Create mount point in Linux OS:
# mkdir /mnt/filevaults

Mention the mounting credentials:
# vim /etc/cred/secret.txt
username= Pdmlinkm
password= WeiKyowxAj

Take care of the correct permissions of the creds file:
# chmod 400 /etc/cred
# chmod 400 /etc/cred/secret.txt
# chmod +t /etc/cred

Manually mount the Windows share on your Linux system:
# mount -t cifs -o username=Pdmlinkm,password=WeiKyowxAj,dir_mode=0755,file_mode=0755 \\10.128.55.52\filevaults /mnt/filevaults

Make the permanent entry in fstab file to make this share persistent across system boot:
# vim /etc/fstab
\\10.128.55.52\filevaults   /mnt/filevaults  cifs credentials=/etc/cred/secret.txt,sec=ntlm,uid=Pdmlinkm,forceuid  0 0


No comments:

Post a Comment