You are not logged in.

#1 2020-07-11 09:39:51

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

[SOLVED] systemd-homed and sudo

I migrated a user account to homed according to the Arch Wiki.

Everything works fine so far, except that the following error is logged whenever the user invokes sudo:

Jul 11 11:20:40 arch sudo[878]: pam_systemd_home(sudo:session): Failed to release user home: No home for user root known

The modified pam.d files as per the Wiki are as follows:

/etc/pam.d/nss-auth

#%PAM-1.0

auth     sufficient pam_unix.so try_first_pass nullok
auth     sufficient pam_systemd_home.so
auth     required   pam_deny.so

account  sufficient pam_unix.so
account  sufficient pam_systemd_home.so
account  required   pam_deny.so

password sufficient pam_unix.so try_first_pass nullok sha512 shadow
password sufficient pam_systemd_home.so
password required   pam_deny.so%                                                                                                                                                                                                                                                                                               

/etc/pam.d/system-auth

#%PAM-1.0

auth      substack  nss-auth
auth      optional  pam_permit.so
auth      required  pam_env.so

account   substack  nss-auth
account   optional  pam_permit.so
account   required  pam_time.so

password  substack  nss-auth
password  optional  pam_permit.so

session   required  pam_limits.so
session   optional  pam_systemd_home.so
session   required  pam_unix.so
session   optional  pam_permit.so

What is missing to get rid of the error message?

Last edited by tucuxi (2020-07-14 09:30:14)

Offline

#2 2020-07-14 09:41:24

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: [SOLVED] systemd-homed and sudo

I solved the issue as follows.

/etc/pam.d/nss-auth:

session  sufficient pam_unix.so
session  sufficient pam_systemd_home.so
session  required   pam_deny.so

/etc/pam.d/system-auth:

session   required  pam_limits.so
session   substack  nss-auth
session   optional  pam_permit.so

Might be a useful addition to the Wiki, but I don't know PAM well enough to fully understand the impact of the change.

Offline

Board footer

Powered by FluxBB