0
Answered
Script to change the admin password
Hi Ubooquity
We are using Ubooquity in our company since today. We have a policy to change passwords regularly.
Is it possible to provide a script to change the admin password from bash (Debian)?
Is webadmin.cred the hashed/encrypted value of the admin password ? What value needs to be stored in webadmin.cred ? What is the algorithm ?
Kind regards
Stefaan Neyts
Customer support service by UserEcho
The content of the webadmin.cred file is generated with:
where
Basically, the HMAC of the password is calculated using the provided salt (using SHA256 as hash function), and the resulting byte array is converted to hexadecimal (hence the "hex_").
Theses are standard functions, which are widely used. Doing the same in a bash script should not be too difficult.
I'm trying to do this as well. I looked at the Stackoverflow thread, but it does not say anything about a salt, neither could I find anything about this elsewhere. I tried this:
but it gives the wrong hash. How should I compute the hash in bash using the specified salt?
I found a way using node.js and the script you referred to: