I would like to update the section in the XML configuration file or add a new one if it is not already used by Augeas.
The XML file is as follows:
<?xml version="1.0"?>
<security>
<users>
...
<user>
<id>deployment</id>
<firstName>Deployment</firstName>
<lastName>User</lastName>
<password>somepasshere</password>
<status>active</status>
<email>changeme1@yourcompany.com</email>
</user>
</users>
</security>
I would like to update the last name / first name / email address if the identifier already exists or add a new user section if it is a new identifier.
In AugTool, I use:
augtool> set /augeas/load/Xml/lens Xml.lns
augtool> set /augeas/load/Xml/incl /security.xml
augtool> load
I'm still learning Augeas, so this was my first attempt to get node:
augtool> print /files/security.xml/security/users/user/*[
What will be the command to update or create a user of a new section in users?
Thank you!
source
share