AIX: PAM enablement to set options.use_pam based on AIX system autht…#697
Open
ajaykini wants to merge 3 commits into
Open
AIX: PAM enablement to set options.use_pam based on AIX system autht…#697ajaykini wants to merge 3 commits into
ajaykini wants to merge 3 commits into
Conversation
daztucker
reviewed
Jul 1, 2026
Author
|
@daztucker , I have refactored the code base as per review comments and tested. Please let me know if the changes looks good. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ype setting
On AIX systems, the operating system's own authentication framework can be configured to use PAM (Pluggable Authentication Modules) or a native AIX authentication stack. This setting is held in the AIX system-wide login configuration attribute SC_AUTHTYPE (under SC_SYS_LOGIN).
Previously, OpenSSH's PAM behaviour on AIX was controlled solely by the UsePAM directive in sshd_config — independently of what the host OS was actually configured to use. This mismatch could cause authentication to succeed via the SSH daemon but still fail (or behave unexpectedly) at the OS session/credential level if the two settings diverged.
This change adds an AIX-specific post-authentication check that reads the host OS authtype setting at runtime and uses it as an additional gate on options.use_pam — PAM is only active when both the OS is configured for PAM_AUTH and sshd_config has UsePAM yes. If either says no, PAM is disabled.