Page 1 of 1

[Solved] root password change

Posted: 26 Mar 2014, 17:55
by rh102801
If at any point I have the need to change the root password, will changing it in an SSH session make it permanent or will it go back to the one created during the ISO build wizard? I am just thinking that in the event a sys admin leaves the company and we need to change passwords would we have to create new ISOs with a new password and reinstall or will changing it from a terminal make that change permanent even after a reboot?


Thanks

Re: root password change

Posted: 26 Mar 2014, 18:23
by rh102801
ok so after further reading I thing I understand (more or less) what I would need to do for this. Basically the ISO contains two directories named /base and /porteus which contain all the files and scripts used during the boot process and to load the kiosk image so basically any changes I make from my SSH connection to let's say the root account would not be permanent and would be wiped after a reboot unless, I copy the /home and /etc directories and replace the ones that are part of the ISO.
That being said I would need to run the squashfs command to extract the files from the ISO, replace the 2 directories (not sure of the specific files) with the live ones and then recreate the ISO using the built in script make_iso.sh

Am I on the right track? sort of?


Thanks

Re: root password change

Posted: 26 Mar 2014, 18:25
by brokenman
post deleted as instructions were given for Desktop Edition.
fanthom

Re: root password change

Posted: 27 Mar 2014, 15:15
by rh102801
Well I guess I was looking at this all wrong. after spending 2 days on this I just realized that I forgot that I was working on a Porteus desktop trying to modify the root user configuration of the kiosk version. I got as far as unpacking the ISO for the kiosk, unquashing the 003settings.xzm file but once there I am not sure how to change the password for root. This is the only thing keeping me from deploying this as a preferred solution as my boss wants to be able to change this root password as needed without having to go to the wizard on the web and creating a new ISO.

Any ideas would be greatly appreciated.
Thanks

Re: root password change

Posted: 27 Mar 2014, 20:33
by francois
Hello rh.

The root password on kiosk is set when you customize it before downloading the iso. :twisted:

You can customize the kiosk ISO using the kiosk wizard here, see second section:
http://build.porteus.org/kiosk/

Re: root password change

Posted: 27 Mar 2014, 22:20
by fanthom
@rh102801

please run this command in terminal:

Code: Select all

echo YOUR_PASSWORD | openssl passwd -1 -salt `echo $(($RANDOM*12345678)) | cut -c 1-8` -stdin
and update 003-settings.xzm/etc/shadow with it. example:

Code: Select all

root:$1$35712342$KAiyW3zWjbjSH4X.mPd/m1:9804:0:::::
changes to:

Code: Select all

root:$1$27037034$0QVFVdq3oSInuo0oXAKZu0:9804:0:::::
make sure this part is not changed (or use it for no password):

Code: Select all

root::9804:0:::::
Cheers

Re: root password change

Posted: 31 Mar 2014, 17:15
by rh102801
Awesome instructions Fanthom this is exactly what I was looking for.

Thank you very much.