Is there a possibility to run a script as root on startup whilst also being able to access files in the encrypted home dir?
I know of /etc/rc.local which can execute scripts as root but since the user hasn't logged in, I can't access files in the home dir
I also know of the startup *.desktop files in ~/.config/autostart/ they can access the home dir since they are executed after login but they aren't run as root.
I want to automount my LUKS encrypted partition whilst using a key file that's in the encryted home directory. The commands mount and cryptsetup require root.
I prefer not to exclude these commands from requiring sudo rights, so this option is not available.
eCryptfs