I have a laptop with an encrypted home directory and a shared folder on my synology NAS to mount on boot automatically.
If I setup this shared folder to be mount in /etc/fstab (credentials in /usr/.creds) it works.
If I setup this shared folder to be mount in /etc/fstab (credentials in /home/user/.creds) it won't work because the directory is encrypted until login and therefore the .creds can't be read.
My question is now.. If I place the .creds in /usr folder, the password can be read from this file if you place the HDD in another computer, or not?
I looks to me as the file is better placed in encrypted home directory?
What about a script to be run after login to mount this share? But to mount a share you need root permissions.
and run the script on reboot would work but how to wait until the user is logged in? Currently used sleep 60 in script, but what if the user log's in after 2min?Code:sudo gnome-schedule
What I can do.. but what won't work as I want
1) Run a script after login without root permissions (cant mount share)
2) Run a script after reboot with gnome-schedule / sleep 60 in script (wont work on every case)
Please someone can help me out?