Change admin password from SSH session
-
- Posts: 5
- Joined: 27 Dec 2024, 20:22
Change admin password from SSH session
I'm in an SSH session with sudo privileges, and I want to change the admin password (for the web setup page) from the command line. Should I modify a file or execute a command?
Re: Change admin password from SSH session
Hi jrbordelon, what hardware are you using? The problem disappears when you update to RevPi OS Bookworm. Only one account is used there, "pi". You can then change this using "passwd". Take a look at the documentation:
https://revolutionpi.com/documentation/ ... -the-image
https://revolutionpi.com/documentation/ ... -the-image
-
- Posts: 5
- Joined: 27 Dec 2024, 20:22
Re: Change admin password from SSH session
I'm using RevPi connect with RO and AIO modules and I need to setup the module with the web page in https://deviceipaddress:41443/
Re: Change admin password from SSH session
Okay jrbordelon, if you are still using WebStatus, simply click on the change password button before logging in. You can find out more about the web status here: https://revolutionpi.com/documentation/revpi-status/
-
- Posts: 5
- Joined: 27 Dec 2024, 20:22
Re: Change admin password from SSH session
To change the admin user's password from the web page, the previous password is required. How do you change the admin user's password from a terminal having root access to the device's Linux account?
Re: Change admin password from SSH session
Hello jrbordelon, take a look here:
viewtopic.php?p=7859#p7859
but the location of the file "login.json" changed since then.
I'll do a test setup using the "2024-04-25-revpi-bullseye-armhf" image.
viewtopic.php?p=7859#p7859
but the location of the file "login.json" changed since then.
I'll do a test setup using the "2024-04-25-revpi-bullseye-armhf" image.
Re: Change admin password from SSH session
Hello my friend, you can try to use these steps to create some script mechanism:
Try to log in via password "reovolutionpi".
You can revert the defaults in case of a lock-out via
Code: Select all
cp /var/www/revpi/data/login.json ~
echo -n reovolutionpi | md5sum | cut -d ' ' -f 1
51390bd55a7fbb7f8c623b095f348e6e
sed -e 's/"ownPW":""/"ownPW":"51390bd55a7fbb7f8c623b095f348e6e"/g' ~/login.json > ~/newlogin.json
sudo cp ~/newlogin.json /var/www/revpi/data/login.json
You can revert the defaults in case of a lock-out via
Code: Select all
cp ~/login.json cp /var/www/revpi/data/login.json
-
- Posts: 5
- Joined: 27 Dec 2024, 20:22
Re: Change admin password from SSH session
It worked perfectly, thank you very much.