Ok, I have here a laptop on which runs Linux (CentOS 7). The laptop will be used from different user's (which have all different login's on the laptop). We have in our network a Samba server. All users which have a login on the laptop have also different login's (user name and password) for different smb drives. The question is now how to configure the linux laptop so that the smb drives for each user will be mount automatically?
The default tipps and hints like adding following line to the fstab
//servername/sharename /media/windowsshare cifs uid=ubuntuuser,credentials=/home/ubuntuuser/.smbcredentials,iocharset=utf8,sec=ntlm 0 0
and create the credentials file (/home/ubuntuuser/.smbcredentials
) don't works in my case because the credential file is for each user the same (but should be a different). Also specifying the credential file like ~/.smbcredentials
don't works because the home directory ~/
is unknown at mount time ...