Notices


Reply
Thread Tools
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#21
I'm at a loss... someone with more indepth knowledge of rootsh will have to chime in.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#22
Originally Posted by Tiboric View Post
i know that, but i was look for an answer to a different question and as someone talked about typing 'rootsh' into xtern to config i tried it about 2 mins before i stumbled across this thread.

im new to maemo and it confused.com me as i didn't know 'root' worked as 'sudo gainroot'. thats my problem anyway when i type sudo gainroot this morning its asking for a password(bugger) but was working fine till then as i was using last night to enable reboot from the menu mod.

any ideas to my problem and the depricated problem?
The "deprecated" issue can be ignored - there's no need to run "rootsh" from X Terminal at all. As for the password query, that's a new one on me - sounds like the sudoers file has been modified/corrupted. Does it happen if you run "root" instead?
 
nintendogs's Avatar
Posts: 44 | Thanked: 13 times | Joined on Nov 2009
#23
I think many of you are a bit confused...

the rootsh package that most people have, 1.5, has 3 ways of gaining root:

1. use "sudo gainroot" or "root" to open a root shell (with slight differences but does not matter now)
2. use "rootsh 'command'" to do the equivalent of "sudo 'command'" but with no password

Since rootsh 1.6 (1.8 available in devel and testing now) only sudo gainroot and root work, rootsh command no longer does.

Don't panic
 

The Following 2 Users Say Thank You to nintendogs For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#24
Yes, I, the maintainer, removed the functionality that lets you do "rootsh <program>". This version is only in extras-devel, however; I never promoted it. You know the risks you take on when you enable extras-devel.

This was due to a security concern* raised to me in which a person in a program can do something like, say, system("rootsh rm -rf /");.

Using "root" and "sudo gainroot" still work to gain a root shell, however, so it's not the end of the world. The message displayed makes this clear.

To developers depending on this functionality: Please use sudoers.d instead. My fmtx-faker package uses it, if you need an example.


* Ironically, johnx pointed out to me that the same behaviour can be achieved by "echo rm -rf / | sudo gainroot" so the jury's out on whether I should bring it back...

Last edited by qwerty12; 2010-01-16 at 12:34.
 

The Following 7 Users Say Thank You to qwerty12 For This Useful Post:
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#25
'rootsh' is afaik the only way to run scripts with root privileges, which is actually necessary to fix certain vpn issues.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 
Posts: 16 | Thanked: 38 times | Joined on Dec 2009
#26
There's a significant difference between root and rootsh. rootsh only executes the current command as root (like 'sudo apt-get ...'), whereas root opens an entire new session (like 'sudo -i'). Couldn't you re-enable rootsh and change it's behaviour to be more like sudo, in that it would ask for the password or something? Requiring a password for all uses of rootsh would also fix the hole you mentioned.
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#27
Requring a password for rootsh would mostly remove the use cases anyway, so I don't see much point. The way it was you could use rootsh as a way to get root-only commands to work in automated scripts. Now, that's obviously a security risk, and that's probably the cause for the depricated status. However, just being able to install packages as 'user' and not 'root' leaves open the whole Pandora's box of security issues anyway.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 
Posts: 282 | Thanked: 18 times | Joined on Mar 2010
#28
guys I m having this issue using quen becon??how do I make it work again??
 
Posts: 356 | Thanked: 123 times | Joined on Dec 2008
#29
I finally figured out what was causing my script not to work. Now I just use:

command | sudo gainroot

This works exactly the same as roothsh except it returns an extra line that says root shell enabled. This makes me wonder what the use of disabling rootsh is. If someone really wants to do something, they will just use sudo gainroot.
 
Posts: 343 | Thanked: 165 times | Joined on Sep 2010
#30
(skipping word "troan")
Yes, troans are pretty nasty. I'm only playing, sounds like nobody should install debian repos on the N900, sounds like a pretty bad idea from a mile away.
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:35.