Command Central 10.5 | Using the Command Line Interface | Invoking Commands from Scripts | Using a Unix Shell Script to Change the Administrator Password for Command Central
 
Using a Unix Shell Script to Change the Administrator Password for Command Central
You can use the following sample Unix shell script to change the Administrator user password for Command Central.
NODE_ALIAS=local                  
USERNAME=Administrator                  
PASSWORD=manage123                  
RCID=OSGI-CCE                  
                  
sagcc get configuration data $NODE_ALIAS $RCID COMMON-LOCAL-USERS                  
-Administrator -o administrator.xml                  
sed "s,/>,><Password>${PASSWORD}</Password>                  
</User>,g" administrator.xml > administrator_new.xml                  
                  
sagcc update configuration data $NODE_ALIAS $RCID COMMON-LOCAL-USERS                  
-Administrator -i administrator_new.xml                 
                 
sed "s,^password=.*$,password=${PASSWORD},g" $HOME/.sag/cc.properties >                 
cc.properties                 
cp cc.propertoes $HOME/.sag/cc.properties                 
sagcc get landscape nodes