[Solved] root password change

Here you can post about the issues related to modifications performed manually (not through the kiosk wizard). Example: swapped kernel, added 3rd party modules or files.
Please describe in detail what has been changed and hopefully other kiosk user will be able to help.
Porteus team wont resolve bugs posted in this category as we support only modifications made by the kiosk wizard.
Forum rules
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
rh102801
Black ninja
Black ninja
Posts: 51
Joined: 21 Mar 2014, 14:02
Distribution: porteus 3.7 kiosk
Location: Chattanooga

[Solved] root password change

Post#1 by rh102801 » 26 Mar 2014, 17:55

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
Last edited by rh102801 on 31 Mar 2014, 17:15, edited 1 time in total.

rh102801
Black ninja
Black ninja
Posts: 51
Joined: 21 Mar 2014, 14:02
Distribution: porteus 3.7 kiosk
Location: Chattanooga

Re: root password change

Post#2 by rh102801 » 26 Mar 2014, 18:23

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

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: root password change

Post#3 by brokenman » 26 Mar 2014, 18:25

post deleted as instructions were given for Desktop Edition.
fanthom
How do i become super user?
Wear your underpants on the outside and put on a cape.

rh102801
Black ninja
Black ninja
Posts: 51
Joined: 21 Mar 2014, 14:02
Distribution: porteus 3.7 kiosk
Location: Chattanooga

Re: root password change

Post#4 by rh102801 » 27 Mar 2014, 15:15

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

User avatar
francois
Contributor
Contributor
Posts: 6435
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: root password change

Post#5 by francois » 27 Mar 2014, 20:33

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/
Prendre son temps, profiter de celui qui passe.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: root password change

Post#6 by fanthom » 27 Mar 2014, 22:20

@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
Please add [Solved] to your thread title if the solution was found.

rh102801
Black ninja
Black ninja
Posts: 51
Joined: 21 Mar 2014, 14:02
Distribution: porteus 3.7 kiosk
Location: Chattanooga

Re: root password change

Post#7 by rh102801 » 31 Mar 2014, 17:15

Awesome instructions Fanthom this is exactly what I was looking for.

Thank you very much.

Locked