- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- ProLiant Servers (ML,DL,SL)
- >
- redfish api to change password
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2023 02:55 AM - last edited on 04-21-2023 03:38 AM by support_s
04-21-2023 02:55 AM - last edited on 04-21-2023 03:38 AM by support_s
We recently brought 8 racks of new servers on line and want to change the default Administator password. All of the servers are connected to OneView. So, I am using OneView credentials to get ilo authorized login. That all is working. To change the password, I did:
echo '{"UserName": "Administrator","Password":"our-new-password"}' > ilo-user
NUMUS=$(curl --insecure --silent --header "X-Auth-Token: ${iLOAuth}" --request GET ${iLOSSO}/redfish/v1/AccountService/Accounts/ | jq -r '."Members@odata.count"')
for (( i=0; i<${NUMUS}; i++ ))l do
LNK=$(curl --insecure --silent --header "X-Auth-Token: ${iLOAuth}" --request GET ${iLOSSO}/redfish/v1/AccountService/Accounts/ | jq -r ".Members[${i}] | .\"@odata.id\"")
if [[ "Administrator" == "$(curl --insecure --silent --header "X-Auth-Token: ${iLOAuth}" --request GET ${iLOSSO}${LNK} | jq -r '.UserName') ]]; then
ACTID=$(echo ${LNK} | cut -d/ -f6)
break 1
fi
done
curl --insecure --silent --header "X-Auth-Token: ${iLOAuth}" --header "Content-Type: application/json" --data "@ilo-user" --request PATCH ${iLOSSO}/redfish/v1/AccountService/Accounts/${ACTID} | jq -r '.'
I get back:
{
"error": {
"code": "iLO.0.10.ExtendedInfo",
"message": "See @Message.ExtendedInfo for more information",
"@Message.ExtendedInfo": [
{
"MessageId": "iLO.2.15.UserAlreadyExist"
}
]
}
}
Can anyone see what I am doing wrong?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2023 03:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2023 11:15 PM
04-23-2023 11:15 PM
Re: redfish api to change password
Hello @bradawk1,
That's great!
We are glad to know you were able to figure it out and we appreciate you for keeping us updated.