You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
should work perfectly fine. There's no need for numbers to follow each other in the tree, they're just numbers given by Augeas when it parses the tree in order to prevent identical labels.
ins 01 before /files/etc/pam.d/sshd/*[1]
set /files/etc/pam.d/sshd/01 "some value"
Insert a record as last line in the document
set /files/etc/pam.d/sshd/01 "some value"
Insert a record right before the record with module = "pam_env.so"
ins 01 before /files/etc/pam.d/sshd/*[module="pam_env.so"]
set /files/etc/pam.d/sshd/01 "some value"
Now in particular for this PAM module in Puppet, you probably want to use the pam provider from augeasproviders which is cleanly written in Ruby and has the features you want:
pam { "Set sss entry to system-auth auth":
ensure => present,
service => 'system-auth',
type => 'auth',
control => 'sufficient',
module => 'pam_sss.so',
arguments => 'use_first_pass',
position => 'before module pam_deny.so',
}
We all know, order matters in the
/etc/pam.d/*
files.Currently, Augeas will read a file like this:
As far as I understand, it is not possible to insert a
record
before therecord
where/module = "pam_env.so"
using theins
command.As a fix, I would suggest changing
seq
tolabel
in line 58 ofpam.aug
, i.e.The text was updated successfully, but these errors were encountered: