Closed smokecatcher closed 4 years ago
There's a typo in your definition (arguments => '['nowtmp', 'showfailed'],
). I assume this is a copy/paste issue?
Yes, that's a typo. I have to hand copy everything from a disconnected network
You're missing control_is_param
in the second definition. Also, you should order the two resources:
pam { 'pam_lastlog.so_ default_control':
ensure => positioned,
service => 'postlogin',
type => 'session',
control => '[default=1]',
control_is_param => true,
module => 'pam_lastlog.so',
arguments => ['nowtmp', 'showfailed'],
position => 'after *[type="session" and module="pam_succeed_if.so"]',
}
->
pam { 'pam_lastlog.so_ required_control':
ensure => positioned,
service => 'postlogin',
type => 'session',
control => 'required',
control_is_param => true,
module => 'pam_lastlog.so',
arguments => ['noupdate', 'showfailed'],
position => 'after *[type="session" and module="pam_lastlog.so" and control="[default=1]"]',
}
works fine for me
I need to have the following in my /etc/pam.d/postlogin:
I created the following pam resources:
Starting with a /etc/pam.d/postlogin file of:
What this gives me in the /etc/pam.d/postlogin file is:
So where did my arguments go?
Version of herculesteam-augeasproviders_pam is 2,2.1, on PE 2019.2 working on RHEL7 test system.