Skip to contentSkip to conversation

su currently requires PAM

DISCUSSION Bruce Dubbs 3 participants 4 messages Dec 27, 2021 – Jan 6, 2022 Util-Linux package

lore
Share & tools
lore
#0 lore raw

In linuxfromscratch, we have been using su from the shadow package because the util-linux version requires Linux-PAM. Recently the maintainers of shadow have announced that they are deprecating su. Our problem is that some of our users prefer to not install PAM.

Is it possible to make the requirement of Linux-PAM optional in the util-linux version of su? From a preliminary inspection of the code, it looks like only login-utils/su-common.c would need to be modified with some #ifdef constructs, but I am not completely comfortable doing that myself.

I am asking one of the maintainers to make the change, but I am willing to attempt creating a patch if no one else wants to do it and the approach would be acceptable to the util-linux project.

-- Bruce Dubbs
linuxfromscratch.org

maintainer
#1 lore raw
Quoted 4 lines · Bruce Dubbs

In linuxfromscratch, we have been using su from the shadow package because the util-linux version requires Linux-PAM. Recently the maintainers of shadow have announced that they are deprecating su. Our problem is that some of our users prefer to not install PAM.

I had a discussion about it with Serge (in CC), it seems the current the conclusion is that "for now shadow will have to keep shipping su".

Quoted 4 lines

Is it possible to make the requirement of Linux-PAM optional in the util-linux version of su? From a preliminary inspection of the code, it looks like only login-utils/su-common.c would need to be modified with some #ifdef constructs, but I am not completely comfortable doing that myself.

The problem is not #ifdef, but that you need local reimplementation for the very basic PAM functionality.

I have suggested creating some minimalistic library with PAM compatible API, but without all the functionality. Maybe we can develop this library in util-linux and later offer it to other projects. Volunteers? ;-)

Another possibility is to improve the original PAM to make it possible to compile it without modules, etc.

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
#2 lore raw
Quoted 8 lines · Karel Zak
Quoted 4 lines · Bruce Dubbs

In linuxfromscratch, we have been using su from the shadow package because the util-linux version requires Linux-PAM. Recently the maintainers of shadow have announced that they are deprecating su. Our problem is that some of our users prefer to not install PAM.

I had a discussion about it with Serge (in CC), it seems the current the conclusion is that "for now shadow will have to keep shipping su".

I haven't mentioned it in the Changelog, but have implied here
https://github.com/shadow-maint/shadow/issues/464
that yes we will not drop su in shadow until there is an alternative.

Quoted 21 lines
Quoted 4 lines

Is it possible to make the requirement of Linux-PAM optional in the util-linux version of su? From a preliminary inspection of the code, it looks like only login-utils/su-common.c would need to be modified with some #ifdef constructs, but I am not completely comfortable doing that myself.

The problem is not #ifdef, but that you need local reimplementation for the very basic PAM functionality.

I have suggested creating some minimalistic library with PAM compatible API, but without all the functionality. Maybe we can develop this library in util-linux and later offer it to other projects. Volunteers? ;-)

Another possibility is to improve the original PAM to make it possible to compile it without modules, etc.

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
#3 lore raw
Quoted 9 lines · Serge E. Hallyn
Quoted 8 lines · Karel Zak
Quoted 4 lines · Bruce Dubbs

In linuxfromscratch, we have been using su from the shadow package because the util-linux version requires Linux-PAM. Recently the maintainers of shadow have announced that they are deprecating su. Our problem is that some of our users prefer to not install PAM.

I had a discussion about it with Serge (in CC), it seems the current the conclusion is that "for now shadow will have to keep shipping su".

That sounds good. Thanks for looking into it.

-- Bruce

Quoted 19 lines

I haven't mentioned it in the Changelog, but have implied here
https://github.com/shadow-maint/shadow/issues/464
that yes we will not drop su in shadow until there is an alternative.

Quoted 15 lines
Quoted 4 lines

Is it possible to make the requirement of Linux-PAM optional in the util-linux version of su? From a preliminary inspection of the code, it looks like only login-utils/su-common.c would need to be modified with some #ifdef constructs, but I am not completely comfortable doing that myself.

The problem is not #ifdef, but that you need local reimplementation for the very basic PAM functionality.

I have suggested creating some minimalistic library with PAM compatible API, but without all the functionality. Maybe we can develop this library in util-linux and later offer it to other projects. Volunteers? ;-)

Another possibility is to improve the original PAM to make it possible to compile it without modules, etc.