View Single Post
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#88
Originally Posted by EL_CID_CAMPEADOR View Post
the question is if rootsh is essentialy needed. i want to put sudo su with password. any posibility of do thath without instal sudo or rootsh? only with the xterminal preconfigured like fresh install :S sorry for eng
You could try to copy /etc/passwd to mmc edit the file, blank the password or put some known password into it.

Code:
cp /etc/passwd /media/mmc1
this would be a line with the password rootme
Code:
root:5aFRhBRgJ87j6:0:0:root:/root:/bin/sh
After you have modified your passwd, start rescueOS mount the root and mount mmc.
Replace the passwd file in /mnt/maemo/etc/.
As an alternative you could use nano to directly edit the passwd file.

Then run following command:

Code:
chmod u+s /mnt/maemo/bin/su
Now you can unmount everything, poweroff and start maemo again. You should be able to do 'su' in a terminal with the new password. After that you can change the password if it was blank.

I will also attach a binary for the N900 which can change the root password in a backup passwd file. Extract it and make it executable. But I guess when you fear rootsh, you will also not running this binary.

Usage:

Code:
./chrootpwd file=/media/mmc1/passwd
It will ask for a new root password which replaces the old one in the file.
Attached Files
File Type: gz chrootpwd.tar.gz (10.6 KB, 67 views)

Last edited by Halftux; 2018-05-08 at 23:46. Reason: forget to unmount
 

The Following 4 Users Say Thank You to Halftux For This Useful Post: