Dear Maintainer, sudo's pam config doesn't create a new keyring session for the processes it spawns. This leads to problems with programs that try to add things to the keyring, because they try to modify the user's keyring, which even root doesn't have permission to do. An example of this was mentioned in this previous bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758788#45 It turns out that this works when logged in as root via SSH because this line in `/etc/pam.d/sshd` sets up a new session keyring for the root user: The same line is also present in `/etc/pam.d/runuser-l`, so I've been working around this problem by running cryptdisks_start via `sudo runuser -l`, as in: so on' Given that it's not useful for a process running on the root user to try to manipulate the user's session keyring, I think it would make sense for /etc/pam.d/sudo to force the creation of a new one, or at least for `sudo -i` to force the creation of a new one via a `/etc/pam.d/sudo-i` config file, similar to `runuser -l`. Thanks, Simon
The pam_keyring(8) manpage advises against adding pam_keyinit ,---- | This module should not, generally, be invoked by programs like su, | since it is usually desirable for the key set to percolate through to | the alternate context. The keys have their own permissions system to | manage this. `---- However, there's no mentioning of the issue described here. For what it's worth, RHEL/CentOS 7 ships an /etc/pam.d/sudo which contains a line. ,---- | session optional pam_keyinit.so revoke `---- and they also seem to have different intended behavior for interactive usage – there's a separate /etc/pam.d/sudo-i which contains ,---- | session optional pam_keyinit.so force revoke `---- Cheers, -Hilko
X-Debbugs-CC: vorlon@debian.org thanks So we need to make up our minds whether to follow up the pam_keyinit maintainers or Red Hat. Maybe the PAM maintainer can comment here? Greetings Marc
X-Debbugs-CC: vorlon@debian.org thanks So we need to make up our minds whether to follow up the pam_keyinit maintainers or Red Hat. Maybe the PAM maintainer can comment here? Greetings Marc
I guess this is supposed to be pam_keyinit(8) since I do find the text there. I would suggest consulting the maintainers of other packages that currently ship references to pam_keyinit and try to get a consensus with them. For example, /etc/pam.d/su-l does reference pam_keyinit in Debian, which seems like it directly contradicts the above manpage but addresses this exact issue. I believe debian-devel is the appropriate for venue for such a discussion.
I guess this is supposed to be pam_keyinit(8) since I do find the text there. I would suggest consulting the maintainers of other packages that currently ship references to pam_keyinit and try to get a consensus with them. For example, /etc/pam.d/su-l does reference pam_keyinit in Debian, which seems like it directly contradicts the above manpage but addresses this exact issue. I believe debian-devel is the appropriate for venue for such a discussion.
Dear Util-Linux Maintainers, in sudo, we have currently the situation whether to add calls to pam_keyinit in our pam configuration files. There is quite a number of packages doing this, but the pam_keyinit documentation advises "programs like su" against doing so. However, in Debian, /etc/pam.d/su-l references pam_keyinit, while /etc/pam.d/su doesn't. On the other hand, doas doesnt seem to reference pam_keyinit at all. If sudo goes the way to mimic what su does, we would reference pam_keyinit in /etc/pam.d/sudo-i which is our form of giving the caller an interactive session, but not in /etc/pam.d/sudo. May I ask for you rationale to do things the way you did them for su and pam_keyinit? Your insights might help us to take a wise decision for sudo. Thanks for your help, which is greatly appreciated. Greetings Marc
Hello Marc, Hello Andreas (added to CC:), * Marc Haber <mh+debian-packages@zugschlus.de> [220206 12:36]: I do not know why this was done for su-l and not su. My speculation would be that we have inherited the su-l PAM config from Fedora, and the su PAM config from src:shadow before 2018. Maybe the distinction is an accident. Andreas, you worked on the su takeover from src:shadow. Do you have insights to share? I will note that our runuser(-l) PAM config also mirrors this: runuser: session optional pam_keyinit.so revoke runuser-l: session optional pam_keyinit.so force revoke It would appear to me that keyutils and pam_keyinit, and most of the util-linux PAM config originate in Fedora(/RH). The Fedora folks are probably the ones to ask how all of this is supposed to work. Sorry that I cannot add much useful info here. Chris
Control: tags -1 help Control: tags 939357 help thanks For the record, the Red Hat maintainer of pam_keyinit didn't bother replying. So the next thing is to follow Steve's advice to reach out to -devel to get consensus. I have currently other things on my plate and would not like to open just another issue here, I am therefore postponing this on my personal schedule. Other team members or people who want to help, please reach out to -devel at will. Thanks in advance. Greetings Marc
Control: tags -1 help Control: tags 939357 help thanks For the record, the Red Hat maintainer of pam_keyinit didn't bother replying. So the next thing is to follow Steve's advice to reach out to -devel to get consensus. I have currently other things on my plate and would not like to open just another issue here, I am therefore postponing this on my personal schedule. Other team members or people who want to help, please reach out to -devel at will. Thanks in advance. Greetings Marc
Hi Chris, thanks for trying to help back in February. I'm coming back to this after being busy with other things. Andreas, did you read this? Chris, Can you give me a pointer to whom in Fedora I'm supposed to reach out? Greetings Marc
Hi Chris, thanks for trying to help back in February. I'm coming back to this after being busy with other things. Andreas, did you read this? Chris, Can you give me a pointer to whom in Fedora I'm supposed to reach out? Greetings Marc
Hello Marc, Chris, Sorry for my late (and possibly pretty lame) reply. [...] [...] I have a very bad memory which is why I try to write down as much as possible in bug reports, commit messages, etc to leave hints for my future self. I need to dig to figure things out myself, but I think the above description is basically correct. (If there's any message from me that you have a problem with interpretting what it means, please point me to it and I can try to interpret my own bad grammar to figure out what I tried to write.) Regards, Andreas Henriksson
Hello Marc, Chris, Sorry for my late (and possibly pretty lame) reply. [...] [...] I have a very bad memory which is why I try to write down as much as possible in bug reports, commit messages, etc to leave hints for my future self. I need to dig to figure things out myself, but I think the above description is basically correct. (If there's any message from me that you have a problem with interpretting what it means, please point me to it and I can try to interpret my own bad grammar to figure out what I tried to write.) Regards, Andreas Henriksson
Hi Marc, * Marc Haber <mh+debian-packages@zugschlus.de> [220705 15:53]: [..] <dhowells@redhat.com>, but I don't know if he is still working on it. This openSUSE bug seems to touch on related questions: https://bugzilla.suse.com/show_bug.cgi?id=1081947 Unfortunately the only real doc appears to be the man page :-| Chris
Hi Marc, * Marc Haber <mh+debian-packages@zugschlus.de> [220705 15:53]: [..] <dhowells@redhat.com>, but I don't know if he is still working on it. This openSUSE bug seems to touch on related questions: https://bugzilla.suse.com/show_bug.cgi?id=1081947 Unfortunately the only real doc appears to be the man page :-| Chris
I reached out to that address a few months ago, they didnt bother replying. doing, they're blindly copying from each other. And nobody cares. Greetings Marc
I reached out to that address a few months ago, they didnt bother replying. doing, they're blindly copying from each other. And nobody cares. Greetings Marc
* Marc Haber <mh+debian-packages@zugschlus.de> [220714 14:10]: behaviour is. Judging by the man page, su, runuser, sudo should probably NOT invoke pam_keyinit, expect if run with a flag simulating login (su/runuser -l, sudo -i?). As we have seen before, there's also a "force" flag, and I really have no idea why it exists or what happens if "force" is not given. My current thinking: 1) should figure out what "force" really does, and more importantly: what happens if "force" is not given 2) su-l, runuser-l, sudo-i should probably call pam_keyinit with force 3) depending on 1), su, runuser, sudo pam files should either all invoke pam_keyinit.so, or none of them should. Chris
* Marc Haber <mh+debian-packages@zugschlus.de> [220714 14:10]: behaviour is. Judging by the man page, su, runuser, sudo should probably NOT invoke pam_keyinit, expect if run with a flag simulating login (su/runuser -l, sudo -i?). As we have seen before, there's also a "force" flag, and I really have no idea why it exists or what happens if "force" is not given. My current thinking: 1) should figure out what "force" really does, and more importantly: what happens if "force" is not given 2) su-l, runuser-l, sudo-i should probably call pam_keyinit with force 3) depending on 1), su, runuser, sudo pam files should either all invoke pam_keyinit.so, or none of them should. Chris
Hello, Bug #906752 in sudo reported by you has been fixed in the Git repository and is awaiting an upload. You can see the commit message below and you can check the diff of the fix at: https://salsa.debian.org/sudo-team/sudo/-/commit/27364e6eda92d3a55d7a11a9ba93ac088c243614 ------------------------------------------------------------------------ add pam_keyinit to pam.d snippets None of the big distribtions seems to know why this is a good idea, but they all do it, and our users have demanded it. Our change is synchronous to what Red Hat does, and it is also the same configuration for other Debian packages like runuser. su does not have the "pam_keyinit.so revoke" thing in pam.d/su, but it has "pam_keyinit.so force revoke" in pam.d/su-l Closes: #906752, #939357 Thanks: Simon Ruggier <simon80@gmail.com>, Sebastian Mohr <sebi@debian.sebi.name>, Guilhem Moulin <guilhem@debian.org> ------------------------------------------------------------------------ (this message was generated automatically) -- Greetings https://bugs.debian.org/906752
We believe that the bug you reported is fixed in the latest version of
sudo, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 906752@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Marc Haber <mh+debian-packages@zugschlus.de> (supplier of updated sudo package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 27 Oct 2026 06:39:22 +0100
Source: sudo
Architecture: source
Version: 1.9.17p2-9exp2
Distribution: experimental
Urgency: medium
Maintainer: Debian Sudo Maintainers <sudo@packages.debian.org>
Changed-By: Marc Haber <mh+debian-packages@zugschlus.de>
Closes: 906752 939357
Changes:
sudo (1.9.17p2-9exp2) experimental; urgency=medium
.
* add pam_keyinit to pam.d snippets.
Thanks to Simon Ruggier <simon80@gmail.com>, Sebastian Mohr <sebi@debian.sebi.name>, Guilhem Moulin <guilhem@debian.org>
(Closes: #906752, #939357)
Checksums-Sha1:
3ab59577100c4e682ca415eedc0b7dcb23b7e77e 1980 sudo_1.9.17p2-9exp2.dsc
a8a2b088b164e314551faf36f9bbba19a0d511d6 53640 sudo_1.9.17p2-9exp2.debian.tar.xz
b09ba0b981e4de93f47147ae973566a7198f7cb8 5211 sudo_1.9.17p2-9exp2_source.buildinfo
Checksums-Sha256:
c4ef3667fe2b5513459106238f9b5cc958fc6fbcd96263a7dbd94d87b63f5b19 1980 sudo_1.9.17p2-9exp2.dsc
75f4ccc63f553064dc86b1cba31d547278f77e9a98c13dd5082a76624d5751f4 53640 sudo_1.9.17p2-9exp2.debian.tar.xz
85ffc67c4b37d225748b9669eecfa26d73a4ac8d06f834301119a643d7d7cd22 5211 sudo_1.9.17p2-9exp2_source.buildinfo
Files:
d50976af5d5776fe6b1900a4e01f01ae 1980 admin optional sudo_1.9.17p2-9exp2.dsc
ea47078e6d9a1ad6108e4faf7b68184e 53640 admin optional sudo_1.9.17p2-9exp2.debian.tar.xz
f41ea61f785d4ea6eb9650b2cd4f1a8a 5211 admin optional sudo_1.9.17p2-9exp2_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iJYEARYKAD4WIQRoUtdjQYCq5giMg+rVTTAMN2ORyQUCauA5xSAcbWgrZGViaWFu
LXBhY2thZ2VzQHp1Z3NjaGx1cy5kZQAKCRDVTTAMN2ORycNeAP4h5yMYphPaTu6z
CPfnTzIqzE5UlJUDkMpShbBYiBYpWQEA1NlzDQG4zDO5BDQLJoRbI9y0T2FKYjFi
TkKmBgoi5wI=
=CbUo
-----END PGP SIGNATURE-----
We believe that the bug you reported is fixed in the latest version of
sudo, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 939357@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Marc Haber <mh+debian-packages@zugschlus.de> (supplier of updated sudo package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 27 Oct 2026 06:39:22 +0100
Source: sudo
Architecture: source
Version: 1.9.17p2-9exp2
Distribution: experimental
Urgency: medium
Maintainer: Debian Sudo Maintainers <sudo@packages.debian.org>
Changed-By: Marc Haber <mh+debian-packages@zugschlus.de>
Closes: 906752 939357
Changes:
sudo (1.9.17p2-9exp2) experimental; urgency=medium
.
* add pam_keyinit to pam.d snippets.
Thanks to Simon Ruggier <simon80@gmail.com>, Sebastian Mohr <sebi@debian.sebi.name>, Guilhem Moulin <guilhem@debian.org>
(Closes: #906752, #939357)
Checksums-Sha1:
3ab59577100c4e682ca415eedc0b7dcb23b7e77e 1980 sudo_1.9.17p2-9exp2.dsc
a8a2b088b164e314551faf36f9bbba19a0d511d6 53640 sudo_1.9.17p2-9exp2.debian.tar.xz
b09ba0b981e4de93f47147ae973566a7198f7cb8 5211 sudo_1.9.17p2-9exp2_source.buildinfo
Checksums-Sha256:
c4ef3667fe2b5513459106238f9b5cc958fc6fbcd96263a7dbd94d87b63f5b19 1980 sudo_1.9.17p2-9exp2.dsc
75f4ccc63f553064dc86b1cba31d547278f77e9a98c13dd5082a76624d5751f4 53640 sudo_1.9.17p2-9exp2.debian.tar.xz
85ffc67c4b37d225748b9669eecfa26d73a4ac8d06f834301119a643d7d7cd22 5211 sudo_1.9.17p2-9exp2_source.buildinfo
Files:
d50976af5d5776fe6b1900a4e01f01ae 1980 admin optional sudo_1.9.17p2-9exp2.dsc
ea47078e6d9a1ad6108e4faf7b68184e 53640 admin optional sudo_1.9.17p2-9exp2.debian.tar.xz
f41ea61f785d4ea6eb9650b2cd4f1a8a 5211 admin optional sudo_1.9.17p2-9exp2_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iJYEARYKAD4WIQRoUtdjQYCq5giMg+rVTTAMN2ORyQUCauA5xSAcbWgrZGViaWFu
LXBhY2thZ2VzQHp1Z3NjaGx1cy5kZQAKCRDVTTAMN2ORycNeAP4h5yMYphPaTu6z
CPfnTzIqzE5UlJUDkMpShbBYiBYpWQEA1NlzDQG4zDO5BDQLJoRbI9y0T2FKYjFi
TkKmBgoi5wI=
=CbUo
-----END PGP SIGNATURE-----
We believe that the bug you reported is fixed in the latest version of
sudo, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 906752@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Marc Haber <mh+debian-packages@zugschlus.de> (supplier of updated sudo package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 04 Nov 2026 17:37:02 +0100
Source: sudo
Architecture: source
Version: 1.9.17p2-11
Distribution: unstable
Urgency: medium
Maintainer: Debian Sudo Maintainers <sudo@packages.debian.org>
Changed-By: Marc Haber <mh+debian-packages@zugschlus.de>
Closes: 906752 939357 1147179
Changes:
sudo (1.9.17p2-11) unstable; urgency=medium
.
* really upload to unstable
.
sudo (1.9.17p2-10) experimental; urgency=medium
.
* upload to unstable
.
sudo (1.9.17p2-9exp2) experimental; urgency=medium
.
* add pam_keyinit to pam.d snippets.
Thanks to Simon Ruggier <simon80@gmail.com>, Sebastian Mohr <sebi@debian.sebi.name>, Guilhem Moulin <guilhem@debian.org>
(Closes: #906752, #939357)
.
sudo (1.9.17p2-9exp1) experimental; urgency=medium
.
[ Mike Gabriel ]
* d/control: B-D on Dh-nss (>= 1.8~)
* d/sudo.nss: Authoritatively manage sudoers: entry in nsswitch.conf.
(Closes: #1147179)
Checksums-Sha1:
a5f319cb5eeb5139d4a91c000d6d3b766426ce45 1968 sudo_1.9.17p2-11.dsc
c691decc459a617b9939f316238d7137c3f38840 53692 sudo_1.9.17p2-11.debian.tar.xz
d85fb93eaddb10130bdb6175dd134e684f021a8d 5225 sudo_1.9.17p2-11_source.buildinfo
Checksums-Sha256:
147a4b3e8528a90233efc30c2a2758900a8dfa1939b0e29a06ad3eb18ce3e444 1968 sudo_1.9.17p2-11.dsc
c22fa6e7b17511ff57f2d995eeb3f9bdfd3358aba0b457c3d82a692d84e9d70b 53692 sudo_1.9.17p2-11.debian.tar.xz
f2f5e1b865965aea484f541afc82ba43a632d74cbbcb069c4a8143f305dbee9c 5225 sudo_1.9.17p2-11_source.buildinfo
Files:
a703d53bae38ac9b437f90b3e6cf7e98 1968 admin optional sudo_1.9.17p2-11.dsc
06a66db53f05e51e5896728bc60a23a2 53692 admin optional sudo_1.9.17p2-11.debian.tar.xz
cc2204fda1a7a09ecdf80879b8206122 5225 admin optional sudo_1.9.17p2-11_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iJYEARYKAD4WIQRoUtdjQYCq5giMg+rVTTAMN2ORyQUCauto7SAcbWgrZGViaWFu
LXBhY2thZ2VzQHp1Z3NjaGx1cy5kZQAKCRDVTTAMN2ORyWGDAQCGwOqHvpEVrCBa
uEjvp4Db6zks8Z+1ilLuCUH6asm3YAD/X3PNmzq9o9YmZo47p3RThzedY7f6otCt
HXXfN5qdaQ8=
=fGrV
-----END PGP SIGNATURE-----
We believe that the bug you reported is fixed in the latest version of
sudo, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 939357@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Marc Haber <mh+debian-packages@zugschlus.de> (supplier of updated sudo package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 04 Nov 2026 17:37:02 +0100
Source: sudo
Architecture: source
Version: 1.9.17p2-11
Distribution: unstable
Urgency: medium
Maintainer: Debian Sudo Maintainers <sudo@packages.debian.org>
Changed-By: Marc Haber <mh+debian-packages@zugschlus.de>
Closes: 906752 939357 1147179
Changes:
sudo (1.9.17p2-11) unstable; urgency=medium
.
* really upload to unstable
.
sudo (1.9.17p2-10) experimental; urgency=medium
.
* upload to unstable
.
sudo (1.9.17p2-9exp2) experimental; urgency=medium
.
* add pam_keyinit to pam.d snippets.
Thanks to Simon Ruggier <simon80@gmail.com>, Sebastian Mohr <sebi@debian.sebi.name>, Guilhem Moulin <guilhem@debian.org>
(Closes: #906752, #939357)
.
sudo (1.9.17p2-9exp1) experimental; urgency=medium
.
[ Mike Gabriel ]
* d/control: B-D on Dh-nss (>= 1.8~)
* d/sudo.nss: Authoritatively manage sudoers: entry in nsswitch.conf.
(Closes: #1147179)
Checksums-Sha1:
a5f319cb5eeb5139d4a91c000d6d3b766426ce45 1968 sudo_1.9.17p2-11.dsc
c691decc459a617b9939f316238d7137c3f38840 53692 sudo_1.9.17p2-11.debian.tar.xz
d85fb93eaddb10130bdb6175dd134e684f021a8d 5225 sudo_1.9.17p2-11_source.buildinfo
Checksums-Sha256:
147a4b3e8528a90233efc30c2a2758900a8dfa1939b0e29a06ad3eb18ce3e444 1968 sudo_1.9.17p2-11.dsc
c22fa6e7b17511ff57f2d995eeb3f9bdfd3358aba0b457c3d82a692d84e9d70b 53692 sudo_1.9.17p2-11.debian.tar.xz
f2f5e1b865965aea484f541afc82ba43a632d74cbbcb069c4a8143f305dbee9c 5225 sudo_1.9.17p2-11_source.buildinfo
Files:
a703d53bae38ac9b437f90b3e6cf7e98 1968 admin optional sudo_1.9.17p2-11.dsc
06a66db53f05e51e5896728bc60a23a2 53692 admin optional sudo_1.9.17p2-11.debian.tar.xz
cc2204fda1a7a09ecdf80879b8206122 5225 admin optional sudo_1.9.17p2-11_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iJYEARYKAD4WIQRoUtdjQYCq5giMg+rVTTAMN2ORyQUCauto7SAcbWgrZGViaWFu
LXBhY2thZ2VzQHp1Z3NjaGx1cy5kZQAKCRDVTTAMN2ORyWGDAQCGwOqHvpEVrCBa
uEjvp4Db6zks8Z+1ilLuCUH6asm3YAD/X3PNmzq9o9YmZo47p3RThzedY7f6otCt
HXXfN5qdaQ8=
=fGrV
-----END PGP SIGNATURE-----