Use Systemd user services with ecryptfs
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I want accomplish the following task:
On a Ubuntu System with multiple Users accounts and encrypted Home directorys a NFS share should be mounted after login.
I want to use systemd user service for this, but can't get it fully working.
What's working so far:
- manual mount with user rights, configured with sudo
- enabling the user service and starting it with systemctl --user start usermount.service
After a reboot systemd doesn't even know that this unit exists.
I think there is a problem in combination with an encrypted $HOME (ecryptfs in my case), because the service unit and autostart configuration are located in .config/systemd/user/
. My assumption is that the systemd user process is started immediatly after login, before decrypting the homedir and hence doesn't see the users configuration.
Whats my possibilities to solve this task?
linux systemd encryption ecryptfs
add a comment |Â
up vote
1
down vote
favorite
I want accomplish the following task:
On a Ubuntu System with multiple Users accounts and encrypted Home directorys a NFS share should be mounted after login.
I want to use systemd user service for this, but can't get it fully working.
What's working so far:
- manual mount with user rights, configured with sudo
- enabling the user service and starting it with systemctl --user start usermount.service
After a reboot systemd doesn't even know that this unit exists.
I think there is a problem in combination with an encrypted $HOME (ecryptfs in my case), because the service unit and autostart configuration are located in .config/systemd/user/
. My assumption is that the systemd user process is started immediatly after login, before decrypting the homedir and hence doesn't see the users configuration.
Whats my possibilities to solve this task?
linux systemd encryption ecryptfs
I have a similar issue on Arch and came to the same conclusion: âÂÂthe systemd user process is started immediately after login, before decrypting the homedir and hence doesn't see the users configurationâÂÂ. I'd also add that it's stopped after unmounting the homedir, so any service which needs to access the homedir at shutdown won't work either. This is even more true when using systemd lingering, which makes user services start after boot, even if the user doesn't log in at all.
â Arkanosis
Jul 23 at 9:24
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I want accomplish the following task:
On a Ubuntu System with multiple Users accounts and encrypted Home directorys a NFS share should be mounted after login.
I want to use systemd user service for this, but can't get it fully working.
What's working so far:
- manual mount with user rights, configured with sudo
- enabling the user service and starting it with systemctl --user start usermount.service
After a reboot systemd doesn't even know that this unit exists.
I think there is a problem in combination with an encrypted $HOME (ecryptfs in my case), because the service unit and autostart configuration are located in .config/systemd/user/
. My assumption is that the systemd user process is started immediatly after login, before decrypting the homedir and hence doesn't see the users configuration.
Whats my possibilities to solve this task?
linux systemd encryption ecryptfs
I want accomplish the following task:
On a Ubuntu System with multiple Users accounts and encrypted Home directorys a NFS share should be mounted after login.
I want to use systemd user service for this, but can't get it fully working.
What's working so far:
- manual mount with user rights, configured with sudo
- enabling the user service and starting it with systemctl --user start usermount.service
After a reboot systemd doesn't even know that this unit exists.
I think there is a problem in combination with an encrypted $HOME (ecryptfs in my case), because the service unit and autostart configuration are located in .config/systemd/user/
. My assumption is that the systemd user process is started immediatly after login, before decrypting the homedir and hence doesn't see the users configuration.
Whats my possibilities to solve this task?
linux systemd encryption ecryptfs
asked Jan 15 at 4:40
Tobias Wohlfarth
64
64
I have a similar issue on Arch and came to the same conclusion: âÂÂthe systemd user process is started immediately after login, before decrypting the homedir and hence doesn't see the users configurationâÂÂ. I'd also add that it's stopped after unmounting the homedir, so any service which needs to access the homedir at shutdown won't work either. This is even more true when using systemd lingering, which makes user services start after boot, even if the user doesn't log in at all.
â Arkanosis
Jul 23 at 9:24
add a comment |Â
I have a similar issue on Arch and came to the same conclusion: âÂÂthe systemd user process is started immediately after login, before decrypting the homedir and hence doesn't see the users configurationâÂÂ. I'd also add that it's stopped after unmounting the homedir, so any service which needs to access the homedir at shutdown won't work either. This is even more true when using systemd lingering, which makes user services start after boot, even if the user doesn't log in at all.
â Arkanosis
Jul 23 at 9:24
I have a similar issue on Arch and came to the same conclusion: âÂÂthe systemd user process is started immediately after login, before decrypting the homedir and hence doesn't see the users configurationâÂÂ. I'd also add that it's stopped after unmounting the homedir, so any service which needs to access the homedir at shutdown won't work either. This is even more true when using systemd lingering, which makes user services start after boot, even if the user doesn't log in at all.
â Arkanosis
Jul 23 at 9:24
I have a similar issue on Arch and came to the same conclusion: âÂÂthe systemd user process is started immediately after login, before decrypting the homedir and hence doesn't see the users configurationâÂÂ. I'd also add that it's stopped after unmounting the homedir, so any service which needs to access the homedir at shutdown won't work either. This is even more true when using systemd lingering, which makes user services start after boot, even if the user doesn't log in at all.
â Arkanosis
Jul 23 at 9:24
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f417162%2fuse-systemd-user-services-with-ecryptfs%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
I have a similar issue on Arch and came to the same conclusion: âÂÂthe systemd user process is started immediately after login, before decrypting the homedir and hence doesn't see the users configurationâÂÂ. I'd also add that it's stopped after unmounting the homedir, so any service which needs to access the homedir at shutdown won't work either. This is even more true when using systemd lingering, which makes user services start after boot, even if the user doesn't log in at all.
â Arkanosis
Jul 23 at 9:24