[augeas-devel] Changing arguments that already exist
Ed
ed.sealing at gmail.com
Tue Mar 9 21:36:22 UTC 2010
Thanks in advance for the help!!
I'm working with /files/etc/pam.d/system-auth. I've been trying to change an
argument that's already there. Either by removing the one that augeas finds
and setting a new one with argument[last()+1], or setting it without
removing. I can't figure out how to do wither one. Here's the example:
My system-auth has the line:
password requisite pam_cracklib.so try_first_pass retry=3
maxrepeats=3 minlen=10 ucredit=-1 dcredit=-1 ocredit=-1
lcredit=-0
When I try to change the lcredit argument by removing and adding to end I
get a type error on the rm:
rm
system-auth/*[module='pam_cracklib.so'][type='password']/argument=regexp('lcredit=.*')
# Doesn't work
set system-auth/*[module='pam_cracklib.so']/argument[last()+1]
lcredit=-$lowercase"]
Or setting it inline with:
set
/files/etc/pam.d/system-auth/*[module='pam_cracklib.so']/argument=~regexp('lcredit=-.*')
lcredit=-2 # Doesn't work either
How would I change an argument by referencing the argument content (without
referencing the argument number directly)?
~Ed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20100309/a1c4a923/attachment.htm>
More information about the augeas-devel
mailing list