maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   How to disable root access? (https://talk.maemo.org/showthread.php?t=36345)

mikkov 2009-12-09 10:03

Re: How to disable root access?
 
Quote:

Originally Posted by smage (Post 418239)
The two files are identical.

Their content is below:


#!bin/sh
#From Andrey Gubarev easyroot
trap exit SIGHUP SIGINT SIGTERM
PATH=/bin:/usr/bin:/sbin:/usr/sbin
if [ "$1" = "--use-su" ]
then
exec su -
else
echo "Root shell enabled"
/bin/sh
fi

You should get the original file somewhere and copy it there. and remove gainroot.old. Unfortunately I have the same situation so I don't know the original file.

You coulld just place empty file as gainroot too.

cpitchford 2009-12-09 10:35

Re: How to disable root access?
 
http://chris.intrepid.cx/N900/gainroot.old

Just scp'd from my phone :)

If you download it, remember to set it chmod 755

You can use it to replace /usr/sbin/gainroot (which appears to be the rootsh version! rootsh package needs some work :)

Before you copy it over, it might be worth pasting a copy of the file into a post here.. someone independent can verify I've not put something malicious in it :)

The md5 hash of the file can be verified using md5sum gainroot.old

8d30ec03fc1b8e6009b2e25c78fbc339

use md5sum gainroot.old to check your downloaded file matches this post

smage 2009-12-09 16:13

Re: How to disable root access?
 
haven't tried but this should work :P

#!/bin/sh -e
trap exit SIGHUP SIGINT SIGTERM
PATH=/bin:/usr/bin:/sbin:/usr/sbin

if [ -x /mnt/initfs/usr/bin/cal-tool ]; then
CALTOOL="/usr/sbin/chroot /mnt/initfs cal-tool"
else
CALTOOL="cal-tool"
fi

MODE=`$CALTOOL --get-rd-mode`
if [ x$MODE = xenabled ]
then
echo "Root shell enabled"
/bin/sh
else
echo "Enable RD mode if you want to break your device"
fi

smage 2009-12-14 16:10

Re: How to disable root access?
 
ok this worked last week perfectly and rootsh was uninstalled + root access disabled.

today i tried to reinstall rootsh, it installed but sudo gainroot is still asking for a password and just like last time the uninstaller through the app manager failed.

RshaoKh 2010-02-03 00:53

Re: How to disable root access?
 
Quote:

Originally Posted by smage (Post 417880)
Ok it's uninstalled now but I'm stil able to gain root access

Did you figure out how to disable it? I got it to uninstall the same way you did but I still have root access...


All times are GMT. The time now is 09:56.

vBulletin® Version 3.8.8