3 Parses htpasswd and rsyncd.secrets files
5 Author: Marc Fournier <marc.fournier@camptocamp.com>
8 This lens is based on examples in htpasswd(1) and rsyncd.conf(5)
12 augtool> set /augeas/load/Htpasswd/lens "Htpasswd.lns"
13 augtool> set /augeas/load/Htpasswd/incl "/var/www/.htpasswd"
16 augtool> get /files/var/www/.htpasswd/foo
17 /files/var/www/.htpasswd/foo = $apr1$e2WS6ARQ$lYhqy9CLmwlxR/07TLR46.
19 augtool> set /files/var/www/.htpasswd/foo bar
23 $ cat /var/www/.htpasswd
28 This file is licensed under the LGPL v2+, like the rest of Augeas.
34 let entry = Build.key_value_line Rx.word Sep.colon (store Rx.space_in)
35 let lns = (Util.empty | Util.comment | entry)*
37 let filter = incl "/etc/httpd/htpasswd"
38 . incl "/etc/apache2/htpasswd"
39 . incl "/etc/rsyncd.secrets"
41 let xfm = transform lns filter