Mount Manually
# mkdir -p /mnt/win
# mount -t cifs -o username=winntuser,password=mypassword //windowsserver/sharename /mnt/win
# cd /mnt/win
# ls -l
Edit the file '/etc/fstab'
# vi /etc/fstab
Append following line in a single line //windowserver/share /mnt/win cifs credentials=/etc/.sambapasswords,iocharset=utf8,_netdev 0 0
Next, create the password file
# vi /etc/.sambapasswords
and add following content
username = winntuser
password = mypassword
Now, make sure only root can access your file # chown 0.0 /etc/.sambapasswords
# chmod 600 /etc/.sambapasswords
No comments:
Post a Comment