2

I am trying to add the below entry to /etc/vfstab on Solaris 11.2 to mount a windows shared folder on reboot time:

//192.168.1.45/share    -   /mnt/winshare  smbfs    -   yes fileperms=0777,dirperms=777

the shared is working, mount folder exists, the only issue that I don't know how and where to set the domainname, username, password, and the other issue that my password having @ character on it so if I used some thing like user:p@ss@192.168.1.45 it won't work.

Kindly advice.

alanc
  • 1,500
masker
  • 21

1 Answers1

2

As said at fstab and cifs mounting, possible to store authentication information outside of fstab? , you can use a credentials file:

credentials=filename: Specifies a file that contains a username and/or password. The format of the file is:

username=value
password=value    

This is preferred over having passwords in plaintext in a shared file, such as /etc/fstab. Be sure to protect any credentials file properly.

Example from /etc/fstab:

//192.168.1.45/share   /mnt/winshare   cifs   credentials=/root/.creda,domain=yourworkgroup

Be sure to limit file permissions to 600 on credentials file, and assure owner is root:root:

chown root:root /root/.creda
chmod 600 /root/.creda

Hope it helps!

emi
  • 283