I have a server that has a number of CIFS shares that need to be accessed on a per-user basis. For example, I have a Music share which I have full access to, but my wife has read-only access.
When either myself or my wife log into our Ubuntu 11.04 laptop I would like these shares to be automatically mounted per user. Now I understand that if I mount as
-t cifs without specifying a user then it will use the
USER environment variable. However, I also need to specify a password, so how can I do that when each user has a different password?
I think my questions are:
- Is there a way for me to have a per-user /etc/fstab?
- If not, is there a way to specify that a mount is only applicable to a certain user?
- Also, the share password is always the same as the local password. Is there a way to specify that this password should just pass through from the client to server rather than having to specify it in a credentials file somewhere?
Or maybe I'm missing something and there's a completely different solution. Can anyone help?