Support agents or administrators need to manage user accounts across multiple Service Assurance Manager (SAM) domains (e.g., Presentation SAM, Notification SAMs, Topology SAM). Manual creation and association with user profiles via the GUI is time-consuming and prone to error.
User administration can be automated using the sm_config utility to export, modify, and import configuration files in XML format.
Before making changes, export the current Users and UserProfiles to serve as templates:
<Base-Dir>/smarts/bin/sm_config -s <SAM_Domain_Name> export -c User User.xml
<Base-Dir>/smarts/bin/sm_config -s <SAM_Domain_Name> export -c UserProfile UserProfile.xmlEdit the exported XML files to add or remove users.
Example XML Structure (Creating User under User.xml):
<?xml version="1.0" encoding="UTF-16" standalone="no" ?>
<ics_config version="2">
<userconfig enable="TRUE" name="maint" timestamp="1770228259"/>
<userconfig enable="TRUE" name="admin" timestamp="1770228259"/>
<userconfig enable="TRUE" name="default" timestamp="1770228259"/>
<userconfig enable="TRUE" name="oper" timestamp="1770228259"/>
<userconfig enable="TRUE" name="test-user" timestamp="0"/> <!-- Custom User Entry Added Here -->
...........
...........Example XML Structure (Mapping User to Profile under UserProfile.xml):
#Locate the desired user profile#
.......
.......
<userprofileconfig enable="TRUE" name="admin-profile" timestamp="1770228416">
<nl>Default</nl>
<multiselect multiselect_value="TRUE"/>
<user>admin</user>
<user>test-user</user> <!-- Customer User created is mapped to admin-profile configuration here -->
<consoleoperation>MapTypeLogicalConnectivityILAG</consoleoperation>
<consoleoperation>DeleteView</consoleoperation>
<consoleoperation>Acknowledge</consoleoperation>
<consoleoperation>StatusTable</consoleoperation>
<consoleoperation>SaveConsoleRemote</consoleoperation> ...etcUpdate the profile to desired one accordingly.
Use the --force flag to apply the new XML configurations to the SAM domain:
<Base-Dir>/smarts/bin/sm_config -s <SAM_Domain_Name> import --force User.xml
<Base-Dir>/smarts/bin/sm_config -s <SAM_Domain_Name> import --force UserProfile.xml
To delete users, remove their respective entries from the XML files and re-import them. The domain will sync and remove the users accordingly.