dell / iDRAC-Redfish-Scripting

Python and PowerShell scripting for Dell EMC PowerEdge iDRAC REST API with DMTF Redfish
GNU General Public License v2.0
606 stars 279 forks source link

related to 126? : root changing the password for another account always fails the GET validation step #129

Closed KeithBierman closed 4 years ago

KeithBierman commented 4 years ago

python3 $DHOME/ChangeIdracUserPasswordREDFISH.py -ip $IDRACIP -uroot -p $IDRACPASS -id 10 -np $MAASPASS khb@LB1EDGRACKCON01:~/bin$ ./testchg 10.192.3.54 foobar

Where IDRACPASS is the root password, but we're changing the password for slot 10 (some other user). Since we don't provide the username for the second slot ... I think the code where we do the GET to verify the password change can't succeed because it's mixing the login name with the name associated with the slot (I suppose we could do a GET to find the username associated with the slot, and always use that for the verify GET.

texroemer commented 4 years ago

Hi @KeithBierman

Script is working correctly but for the string messages printed, i was passing in the wrong value for user ID (string formatting issue). I fixed the issue and uploaded new script.

The script is getting the username for the account ID you want to change the password and using that username to test password change but the user privilege is set to None, GET request will fail which is expected.