Use Systemd user services with ecryptfs

The name of the pictureThe name of the pictureThe name of the pictureClash 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?







share|improve this question




















  • 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














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?







share|improve this question




















  • 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












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?







share|improve this question












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?









share|improve this question











share|improve this question




share|improve this question










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
















  • 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















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















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



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














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













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay