Location: OpenManage Scripts and Tools

Discussion: Drac password change

Keyword tags: openmanage scripts tools

Watch
Stooartbaby
Stooartbaby
Drac password change
Jun 10 2008, 1:29 AM EDT
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.
0  out of 1 found this valuable. Do you?    
scott_hanson
scott_hanson
RE: Drac password change
Jun 10 2008, 12:13 PM EDT
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 :-)
Do you find this valuable?    
Stooartbaby
Stooartbaby
RE: Drac password change
Jun 10 2008, 10:33 PM EDT
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.
Do you find this valuable?    
tgoetzman

tgoetzman
RE: Drac password change
Jun 13 2008, 3:18 PM EDT
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
Do you find this valuable?    
Stooartbaby
Stooartbaby
RE: Drac password change
Jun 15 2008, 6:01 PM EDT
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.


Do you find this valuable?    

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)
Top Contributors
Browse by Keywords
Loading...