[augeas-devel] passwd lens patch

Jimmy Dorff jdorff at phy.duke.edu
Tue Apr 13 13:55:34 UTC 2010


Hi Folks,

I've been learning to use augeas and I've come across one issue. When I 
manipulate Unix passwords files, the lens has a problem when the 
password file contains a MD5 style password common on newer unix 
systems. An example of this type of password can be obtained from 
"openssl passwd -1".

My "fix" for this was to change the "password" from a "word" to a 
"sto_to_col?" in "lenses/passwd.aug":

34c34
<                 . [ label "password" . store word    . colon ]
---
 >                 . [ label "password" . sto_to_col?   . colon ]

I don't know if this is the best solution, but it is working for me.

Cheers,
Jimmy Dorff






More information about the augeas-devel mailing list