Start a Conversation

Solved!

Go to Solution

412

October 4th, 2022 08:00

Customer want to add user in all idracs-9 30 clusters is there an automation we can use

we have 30 clusters 380 esxi nodes  Vxrail 

we need to add user  to idrac -9  versins 5.xx  with read only   how can we automat this ? in a cluster level  or on all the enlivenment

racadm -r -u -p P config -g cfgUserAdmin -I -o cfgUserAdminUserName

racadm -r -u -p config -g cfgUserAdmin -I -o cfgUserAdminPassword

racadm -r -u -p config -g cfgUserAdmin -I -o cfgUserAdminPrivilege   

racadm -r -u -p config -g cfgUserAdmin -I -o cfgUserAdminEnable 1

thank you  

 

4 Operator

 • 

2.2K Posts

October 5th, 2022 10:00

Grrrr.... this forum software drives me nuts....

You have to took the scripting language of your choice and create a simple loop and place your needed radadm commands into it.
Here is a example of a window *.bat/*.cmd script which query 3 iDRACs  and delete the job queue because thats the first step in my script followed by up 50 settings i need to configure on every single iDRAC. I need to deploy around 100 Server per year.

@echo off

setlocal
setlocal EnableDelayedExpansion
setlocal EnableExtensions

:: Script version
set VERSION=1.8

:: Begin of configuration
set IDRAC_HOST=10.10.1.1 10.10.1.2 10.10.1.3

set IDRAC_USER=root
set IDRAC_PASS=secret

:: Path to the binary. If TNG tools installed than its already in the %PATH%
set RACADM_BIN=racadm

:: End of configuration

echo Configure Dell iDRAC %VERSION%
for %%s in (%IDRAC_HOST%) do (
  echo Host: start %%s configuration

  :: Delete all existing jobs
  for /f "tokens=*" %%i in ('%RACADM_BIN% -r %%s -u %IDRAC_USER% -p %IDRAC_PASS% jobqueue delete --all ^| find /C /i "was cancelled by the user"') do set "COUNT=%%i"
  If !COUNT! EQU 1 (
    echo  Delete jobqueue                                                    ...... [ok]
  ) else (
    echo  Delete jobqueue                                                    ... [error]
  )   
  set "COUNT="
 

  echo Host: end %%s configuration
  echo.
  echo.  
)

4 Operator

 • 

2.2K Posts

October 4th, 2022 10:00

Your racadm command with '-g' switch looks old school which is OK but not the modern style.

The iDRAC have up to 16 user slots and the #2 is reserved(used) for "root". You mentioned a VxRAIL so you have to investigate the current user list because VxRAIL already populated one or two slots.

  1. Create a *.bat, *.sh script with a loop around your commands.
  2. You can use OME(Open Manage Enterprise) and execute commands on iDRAC
  3. If "racadm" installed within the ESXi you execute from there too

So i have create a user named "Foobar" and than pull the info trough racadm.

 

[root@esx-node-02:~] racadm get iDRAC.Users.10
[Key=iDRAC.Embedded.1#Users.10]
..
Privilege=0x1
..
UserName=Foobar

[root@esx-node-02:~] racadm get iDRAC.Users.10.Privilege
[Key=iDRAC.Embedded.1#Users.10]
Privilege=0x1
[root@esx-node-02:~] racadm help iDRAC.Users.10.Privilege
Privilege -- Specifies the role-based authority privileges allowed for the user.
Below list shows the decimal values for each individual privilege. To create a
custom privilege, add up the privilege decimal values and set the attribute to
the value. Login - 1, Configure - 2, Configure Users - 4, Logs - 8, System
Control - 16, Access Virtual Console - 32, Access Virtual Media - 64,
System Operations - 128, Debug - 256

The "Read-only" role only contains the "log into iDrac" permission and this is privilege "0x1"

 

Regards,
Joerg

3 Posts

October 5th, 2022 01:00

HI 

I have seen in some blogs that i can get the xml file  after creating my user  and propagate that file to other iDRACs  is this possible if yes how can we do it ?  much appreciate your help  

3 Posts

October 5th, 2022 01:00

Thank you Joerg for all the information you provided ,  excuse my ignorance on idrac scripting  iam a vxrail guy so we do not interact with idrac that much . i picked up the commands from a blog and i tried them on my lab   

how can i push that script to all idracs  , as i sad i need to add one user  for all idracs and if you can show me the new way to write the command to create  user that will be great  

Regards 

No Events found!

Top