Active Topics

 



Notices


Reply
Thread Tools
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#1
Here is another package enabling root access on the tablet.

Features:
  • Sudo gainroot works without having RD-Mode enabled.
  • There is the root command which is quicker to type and sources the root .profile among others.
  • An rootsh command allows you to quickly run an command as root without having to wait for an root shell. It works like sudo (rootsh <command>.

This package provides the exact same functionality of easyroot (and a slight bit more) and becomeroot (a lot more).

The main reason for this package was to have a package in extras that would give you root without having to leave the application manager.

To install, you can find this in the chinook & diablo extras, which if they are enabled, you should see a package called rootsh showing up in your application manager.

Alternatively, you can just click the the install file from here:
http://maemo.org/downloads/product/OS2008/rootsh/
 

The Following 16 Users Say Thank You to qwerty12 For This Useful Post:
GeneralAntilles's Avatar
Posts: 5,478 | Thanked: 5,222 times | Joined on Jan 2006 @ St. Petersburg, FL
#2
qwerty12's the man!

Already updated the wiki to recommend rootsh, I suggest everybody forget about the other two and only recommend this one.
 

The Following User Says Thank You to GeneralAntilles For This Useful Post:
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#3
A good example of the community stepping up to replace (and side-line) applications which aren't in Extras.
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 

The Following 2 Users Say Thank You to Jaffa For This Useful Post:
Posts: 47 | Thanked: 78 times | Joined on May 2008
#4
qwerty12, you saved the a55 of my colleague who put /bin/root into the shell field of /etc/passwd for user root, and couldn't get root anymore :-)

One small note: maybe it would make sense by default to run /bin/bash instead of /bin/sh if it exists. I think if somebody installed bash, then it prefers bash over the default shell.

Also it would be better to run /bin/sh and /bin/bash with the -l option (login). This will load ~/.profile for the user account and possibly other stuff to set up the shell for root.

By the way, wouldn't it be easier to just install a file under /etc/sudoers.d/ with something like:

user ALL = NOPASSWD: ALL

? Then you can sudo any command. Or even with user's password (if removing NOPASSWD, just like in Ubuntu.
 

The Following User Says Thank You to anpaza For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#5
Originally Posted by anpaza View Post
Also it would be better to run /bin/sh and /bin/bash with the -l option (login). This will load ~/.profile for the user account and possibly other stuff to set up the shell for root.
sudo gainroot is used how nokia intended it to be used . If I introduce changes, it may break scripts that depend on sudo gainroot (kernel_flasher, lardman's sbcenc's install script etc).

running "root" however uses su and that will spawn a root shell that does load /root/.profile etc. su naturally uses the shell specified in /etc/passwd.

Originally Posted by anpaza View Post
One small note: maybe it would make sense by default to run /bin/bash instead of /bin/sh if it exists. I think if somebody installed bash, then it prefers bash over the default shell.
I think that rootsh does try run /bin/bash first before running sh, from what I can tell from the source anyway. But I'm not a programmer so I may be wrong .

Originally Posted by anpaza View Post
By the way, wouldn't it be easier to just install a file under /etc/sudoers.d/ with something like:

user ALL = NOPASSWD: ALL

? Then you can sudo any command. Or even with user's password (if removing NOPASSWD, just like in Ubuntu.
I thought about that but I was unsure whether it was wise to include it. After all, a lot of stuff uses sudo and I don't want to try and create any security problems . Although you could argue rootsh (the program) does do that :/

Thanks for the suggestions though, much appreciated.
 
Posts: 47 | Thanked: 78 times | Joined on May 2008
#6
Okay, I hate to be the next guy to release the 1001th-gainroot-package, but I waited long enough for somebody to implement such a thing properly

So, I did a small package which allows to gain root access by configuring 'sudo' properly. After that sudo works much like in Ubuntu - by asking the user password once in every session. You can also choose to not use a password, in which case you'll get just another 'gainroot'-alike package.

The package contains just a small config file for sudo, and a small shortcut script called "rush" which drops you to a root shell (it just executes sudo -H -i).

Packages should appear here:

http://repository.maemo.org/extras-d...free/s/sudser/
http://repository.maemo.org/extras-d...free/s/sudser/

The chinook package is untested, if anybody tries it please tell me the result.
 

The Following 3 Users Say Thank You to anpaza For This Useful Post:
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#7
Thanks for the sudser port it certainly has its place besides rootsh.

Its normally my preferred way of gaining root except, in public, I don't want to type [such] passwords.
 
GeneralAntilles's Avatar
Posts: 5,478 | Thanked: 5,222 times | Joined on Jan 2006 @ St. Petersburg, FL
#8
Originally Posted by allnameswereout View Post
Thanks for the sudser port it certainly has its place besides rootsh.
I'd much rather see sudser merged with rootsh than be in the same situation again with a lot of disparate root packages that mostly accomplish the same thing.

Though one user reported a reboot loop after installing sudser.
 
Posts: 47 | Thanked: 78 times | Joined on May 2008
#9
Maybe that was me, I was debugging sudser :-) I'm zap on irc.

I agree there are too many gainroot packages around. But I think using sudo which is already present on any system is the proper way to do it; besides saving a bit of space it also allows to protect root access with user password.

And about merging... I don't see what can be merged here, sudo can do everything rootsh can, and more.

Last edited by anpaza; 2008-07-20 at 00:31.
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#10
Well... sudser fuxs up my device. When I install it I cannot boot my NIT anymore. Beware!
 
Reply

Tags
becomeroot, rd-mode, root, rootsh, sudo


 
Forum Jump


All times are GMT. The time now is 02:57.