OCI - CIFS Mounts With Encrypted Password
in Linux
Applies to:
Linux x86-64
Oracle Linux 8 – Oracle Linux 9
Goal:
How do you mount a CIFS share with an encrypted password
# cat /root/.password username=domain\user
password=passw0rd # chmod 400 /root/.password # mount -t cifs -o credentials=/root/.password //<samba_server>/<path> /<mount-point>/
Solution:
Encrypted passwords cannot be used in a credential file. Mount command needs access to the plaintext password in order to mount the share.
The permissions on the password file must be changed to have the file accessible to admin
user alone.
Kerberos authentication can be used in place of credentials by using mount options sec=krb5 or sec=krb5i in a Kerberos environment.
0