UNSOLVED

Stooartbaby

updated

18 years ago

S

Stooartbaby

2 Intern

132 Posts

0

52291

June 9th, 2008 23:00

Drac password change

Hi Guys,

I was wondering if anyone had a script that I could use to change the DRAC password on multiple servers... I was hoping that I could point the script to a server list (which I have) instead of visiting each server manually to apply the change. I have ERA, DRAC4/I, DRAC4/P and DRAC5 devices in my environment. I also have some RedHat enterprise 4 servers as well (DRAC5 only) but don’t yet know the command line options for this…

I was also wondering if this could be setup as a task within IT Assistant?? I have no idea if this is possible…. but it would make it much easier to comply with our password rotation policy…

I know the following commands are used to change the password… not sure about the ERA (2650servers) devices though…

For DRAC 4 - As root on the host run the following racadm command:

racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 1 "password"


For DRAC 5 - As root on the host run the following racadm command (notice its index 2 for DRAC 5):

racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 "password"

Any comments/help would be greatly appreciated as I have about 130 (Windows) and 6 Redhat servers to change….

Thanks,
Stuart.
  • 8687

    0

    Posted June 10th, 2008 10:00

    How good are you at scripting ? I would tackle this from the linux side, as it's slightly easier to write scripts in linux, some psuedo code of what I was thinking.

    First you'll have to add a second column to your list of servers that specifies what DRAC type it is .. so something like,

    Server1 DRAC4
    Server2 DRAC4
    Server3 DRAC5
    Server4 DRAC4
    Server5 ERA
    ....

    The script would then read each line of the server file and loop doing a conditional on the DRAC type for different racadm commands for the different types. And you would just use the variables in the racadm command as it loops through, ie,

    racadm -u $USERNAME -p $PASSWORD -r $SERVER -o cfgUserAdminPassword -i 2 $NEWPASSWORD

    If you want me to write the code, you have to send ME a shirt :-)
  • Stooartbaby

    2 Intern

    132 Posts

    8687

    0

    Posted June 10th, 2008 20:00

    Okay... this is what I have got so far...

    I can create a report from within ITA which shows the following: This from the "RAC" folder only (which may be an issue)

    Device Name System Model Type
    our-server01-drac.domain.org.au DRAC 4/I
    our-server02-drac.domain.org.au DRAC 5
    our-server03-drac.domain.org.au ERA

    I found a script which can run a command (ping in this case) against devices called from a html file (aka a modified version of the file created above)... combining the html report with the Scott's racadm command mentioned above may do what we want....

    http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true

    I am still trying to workout how to combine all this... and am unsure if I will also need to use PSExec somehow to make sure the command will run on the remote computer... as an aside, I was wondering if I enabled telnet on all the dracs, would that make this easier?? I am sure i read somewhere that racadm commands can be done via telnet or some such?

    I am off home… I will have a go at this tomorrow… : )

    Thanks,
    Stuart.
  • PhilG327

    13 Posts

    8687

    0

    Posted June 13th, 2008 13:00

    Use the racadm command. You won't need to write a fancy script or use PSEXEC.
    use something like this:
    racadm -r servername -u root -p calvin config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 newpassword
  • Stooartbaby

    2 Intern

    132 Posts

    8687

    0

    Posted June 15th, 2008 16:00

    Hi there,

    To comply with our security policy, I need to change the password on all servers every 3months... so scripting it (I hope) will be the best option....due to the large number of servers... and because we have multiple adds/moves/changes with regards to servers... I need to grab the data from an up-to-date server list.... which is why I was thinking excel...

    Maybe I should ask for this to be built into the next version of openmanage.... select all dracs, right click, change password... :) easy!

    Stuart.