Centos – Looking for a way to mount cifs shares on centos 6 with multiple users

centoscifsnetwork-share

We have a CIFS share on our network. I have a centos 6.3 server in which I want to map the share.
The problem is that when mounting it in /etc/fstab I have to set which user (and password) to use.
The problem is that the linux server has many users. I would like the local user to be used when interacting with the share (so the permissions for the share are the same as the user's instead of one for all).
Furthermore, I do not want to save the password in plaintext (even the credentials file is plain text even if the permissions are limiting).
Is there a solution for this?

Best Answer

look at autofs which dynamically mounts shares using the automount daemon. look at the man pages and you should come up with something similar:

auto.master
/cifs /etc/auto.home --timeout=10 

auto.home
share -fstype=cifs,rw,credentials=/etc/samba/credentials ://192.168.0.12/share
Related Topic