6 Replies Latest reply on Apr 5, 2005 11:21 AM by Greg Kullberg

    Script to add users to users.local file



      This is my first post, so please no rude comments... ;)


      We're trying to create a smart way of managing our users.local file. Basically, we want all users that are members of the RBACAdmins role to be automatically included in the users.local file across all servers.


      We've created this script:





      1. this script copies all RBACADmins into the users.local file



      foreach host in $hostlist


      echo $host

      echo > //$host/usr/lib/rsc/users.local

      echo removed

      userlist=`blcli RBACUser getAllUserNamesByRole RBACAdmins`

      foreach user in $userlist


      echo $user

      echo RBACAdmins:$user rw,map=root >> //$host/usr/lib/rsc/users.local





      The host list is passed as a parameter and the script actually runs on the application server through config manager as an NSH script.


      The problem is the script runs as BLAdmin on the app server, and therefore can't update users.local file, because this user doesn't have the necessary permissions on the target servers. If, however, we were to run the script on each of the servers - then blcli would either prompt for user/password or require a user_info.dat file on each server (which we don't want to do)


      Any suggestions??






      Message was edited by: Brad Jacobs