Use the following example as a starting point when you develop your own script.
This example assumes that the file sp-ips.txt contains a newline delimited list of Service Processor IP addresses. For example:
10.10.30.15
10.10.30.16
10.10.30.17
10.10.30.18
The following command creates the manager-level users "jack" and "jill" with the password "daisies" on all Service Processors. Error checking occurs in this example: if an error is encountered a message displays and the command exits.
#!/bin/sh
cat sp-ips.txt | while read ip; do
ssh $ip access add user -user jack -password daisies -group manager 2>/dev/null
if [ $? != 0 ]; then
echo Error adding jack to SP $ip | mail admin@yourhost.com
exit 1
fissh $ip access add user -user jill -password daisies -group manager 2>/dev/null
if [ $? != 0 ]; then
echo Error adding jill to SP $ip | mail admin@yourhost.com
exit 1
fi
done