Skip to content

Comments

[5.3.2, 5.3.3.3.1, 5.3.3.3.x] fix pam_pwhistory file generation#147

Merged
uk-bolly merged 1 commit intoansible-lockdown:develfrom
bykvaadm:fix_pam_pwhistory
Feb 23, 2026
Merged

[5.3.2, 5.3.3.3.1, 5.3.3.3.x] fix pam_pwhistory file generation#147
uk-bolly merged 1 commit intoansible-lockdown:develfrom
bykvaadm:fix_pam_pwhistory

Conversation

@bykvaadm
Copy link
Contributor

@bykvaadm bykvaadm commented Feb 17, 2026

5.3.2
remove duplicates in jinja template. Audit regexp from ubuntu cis won't work ever because of this. (5.3.3.1)

5.3.3.3.1, 5.3.3.3.2, 5.3.3.3.3
fix when condition: if grep fails (no history string in pam config) - stdout will be empty and we won't check if right string goes in config file.

P.S.:
if ansible fails before running to the end we will never update pam, because all conditional checks with /usr/share will pass and never run handlers. This is true to all this kind of tasks.

P.P.S.:
something to think about: we put this file in ansible at 5.3.2 and full rewrite it. then in 5.3.3.3.1 we check line. maybe we should not do this at all? we believe that the center of truth is in 5.3.2. and notification of pam update is also there. why checking string second time in 5.3.3.3.1 (we don't check the value of pw_history, in fact we double-check ourselves that jinja template is correct)

Signed-off-by: Kondratev Alexander <info@bykvaadm.ru>
@bykvaadm bykvaadm changed the title [5.3.2, 5.3.3.3.1] fix pam_pwhistory file generation [5.3.2, 5.3.3.3.1, 5.3.3.3.x] fix pam_pwhistory file generation Feb 17, 2026
Copy link
Member

@uk-bolly uk-bolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superb work thank you

@uk-bolly uk-bolly merged commit 7a94d6d into ansible-lockdown:devel Feb 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants