-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pulseaudio fails to automatically start on login when the home directory is encrypted #270
Comments
I can confirm the issue. I'm also running I didn't dare fiddling with pam settings, but just manually run |
Actually, I've found another way of handling this issue. One that does not require a direct edit to be made to the Find the This can be done like so: Output:
Obtain the Output:
Select a new priority number for fscrypt Referring to the example above, we have: So, the priority number must be between 0 and 256. Say we arbitrarily choose a priority number of: 252. Set this arbitrarily chosen priority number viz. 252 as the priority for the file: So, change the contents of file: FROM: Name: fscrypt PAM passphrase
TO:
Note of the "Name:" attribute/property of the configuration files In the above example they are respectively: Based on our recent changes to the Verify and update the module configuration changes In screen that opens ensure that in the displayed modules are ordered such that the module Tab to the For example:
Verify changes are automatically reflected Output:
That's it |
Services launched by systemd user sessions on Debian / Ubuntu systems are often not able to access the home directory, because there is no guarantee / requirement that pam_fscrypt is sequenced before pam_systemd. Although this pam-config mechanism is Debian-specific, the config file is provided here upstream and unmodified in Debian. Raising the priority here so that it's always ordered ahead of pam_systemd will solve issues such as google#270, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964951 and https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1889416.
The Debian/Ubuntu pam-config for fscrypt is defined upstream, namely here - https://github.com/google/fscrypt/blob/master/pam_fscrypt/config#L3 - so a simple MR can solve this bug for Debian & derivs: #278 Also noting here that if you have "lingering" enabled for your user in logind, then systemd will launch the user session at system boot time, causing the same problem. |
Services launched by systemd user sessions on Debian / Ubuntu systems are often not able to access the home directory, because there is no guarantee / requirement that pam_fscrypt is sequenced before pam_systemd. Although this pam-config mechanism is Debian-specific, the config file is provided here upstream and unmodified in Debian. Raising the priority here so that it's always ordered ahead of pam_systemd will solve issues such as google#270, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964951 and https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1889416. After a survey of pam-config files available in Debian bullseye, the value of 100 was chosen as it appears after most other plugins that could be involved in more explicit homedir configuration (eg pam_mount at 128) but before those which seem unlikely to work without a home directory (eg pam_ssh at 64).
Services launched by systemd user sessions on Debian / Ubuntu systems are often not able to access the home directory, because there is no guarantee / requirement that pam_fscrypt is sequenced before pam_systemd. Although this pam-config mechanism is Debian-specific, the config file is provided here upstream and unmodified in Debian. Raising the priority here so that it's always ordered ahead of pam_systemd will solve issues such as #270, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964951 and https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1889416. After a survey of pam-config files available in Debian bullseye, the value of 100 was chosen as it appears after most other plugins that could be involved in more explicit homedir configuration (eg pam_mount at 128) but before those which seem unlikely to work without a home directory (eg pam_ssh at 64).
This was fixed for users of Debian-based distros (distros using Please note that this issue won't be fixed in the |
Just stumbled over this and want to mention for other readers that the fix is not yet integrated into the Debian package at the time of writing this. Related Debian bug is https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=986688 |
It's 22/2/22 and I had do it manually on Raspberry Pi OS bullseye.. |
My environment is the Ubuntu 20.04. I installed fscrypt after compiling from source as described on this GitHub site. After installing fscrypt I noticed that pulseaudio failed to automatically start after login. I had to explicitly start pulseaudio manually each time using:
pulseaudio --start
Here are my system details:
Kernel version:
5.4.0-56-generic
Ubuntu details:
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
fscrypt version:
fscrypt version v0.2.9-11-gcc933cd
To fix this issue permanently, I had to make the following change:
In file
/etc/pam.d/common-session
move the line containingpam_systemd.so
below the linecontaining
pam_fscrypt.so
.So, in file:
/etc/pam.d/common-session
change the "Additional block" section like so:FROM:
TO:
I found this fix by referring to the following link:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1889416
It would be great if this could be handled automatically at install time.
Thank you.
The text was updated successfully, but these errors were encountered: