Reply
Thread Tools
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#1
start xterm
become root (if you don't know how, then all this doesn't apply to you anyway)
make sure you have proper root password set!
run command:
Code:
sed -e "s/Defaults env_reset/Defaults env_reset\nDefaults targetpw/; \
 s+user ALL = NOPASSWD: /usr/sbin/gainroot+user ALL = PASSWD: \ /usr/sbin/gainroot+" -i  /etc/sudoers.d/01sudo

run update-sudoers, check there's no warnings or errors

if sudo gainroot still doesn't ask for password, it might be cached from previous entering it: sudo -k clears pw cache

Tested for PR1.2 with default rootsh installed, works for me. If you bork everything, a reinstall of rootsh package should get you out of quicksand

THIS IS ABOUT *ROOT* PASSWORD for root account, not about that silly Ubuntu idiocy to ask for user password to do root things

this is an excerpt of http://wiki.maemo.org/User:Joerg_rw/tools

If you feel this is a useful post, consider hitting the 'Thanks' button over ->there
__________________
Maemo Community Council member [2012-10, 2013-05, 2013-11, 2014-06 terms]
Hildon Foundation Council inaugural member.
MCe.V. foundation member

EX Hildon Foundation approved
Maemo Administration Coordinator (stepped down due to bullying 2014-04-05)
aka "techstaff" - the guys who keep your infra running - Devotion to Duty http://xkcd.com/705/

IRC(freenode): DocScrutinizer*
First USB hostmode fanatic, father of H-E-N

Last edited by joerg_rw; 2010-09-13 at 18:49.
 

The Following 8 Users Say Thank You to joerg_rw For This Useful Post:
giannoug's Avatar
Posts: 334 | Thanked: 171 times | Joined on Dec 2009
#2
I guess you need to setup a password for "user" first.

passwd user in root
 
Posts: 219 | Thanked: 40 times | Joined on Sep 2010
#3
Any fix for PR 1.3? It doesn't seem to be working any more. The "sed -e" complained about "unsupported command e", so I added:
Code:
Defaults targetpw
user ALL = PASSWD: /usr/sbin/gainroot
to "/etc/sudoers.d/01sudo"
Did the update and clear cache, but still, it doesn't ask for a password.
 
leetut's Avatar
Posts: 1,169 | Thanked: 1,174 times | Joined on Jan 2010 @ sunderland
#4
nope, im quite happy that it DOESN'T ask me for a password
and i'd be looking for a way to disable it if it did
__________________
born to rage against them
 

The Following 3 Users Say Thank You to leetut For This Useful Post:
Posts: 219 | Thanked: 40 times | Joined on Sep 2010
#5
OK, found it. I need to modify this:
Code:
Defaults env_keep+=GTK_MODULES
user ALL = PASSWD: ALL
in "/etc/sudoers"
 
Posts: 323 | Thanked: 116 times | Joined on Jul 2010
#6
Another possibility:
Uninstall rootsh (or block it with chmod a-x /usr/sbin/gainroot)
Install an ssh-server

login with ssh on your own device:
ssh root@localhost
password:

Last edited by gerdich; 2011-01-25 at 22:23.
 
Posts: 1,042 | Thanked: 430 times | Joined on May 2010
#7
Originally Posted by leetut View Post
nope, im quite happy that it DOESN'T ask me for a password
and i'd be looking for a way to disable it if it did
Sometimes you have to face it... Not all people are like you
 

The Following User Says Thank You to Radicalz38 For This Useful Post:
Posts: 98 | Thanked: 31 times | Joined on Nov 2009
#8
Originally Posted by joerg_rw View Post
THIS IS ABOUT *ROOT* PASSWORD for root account, not about that silly Ubuntu idiocy to ask for user password to do root things
Auditability....
 
Reply


 
Forum Jump


All times are GMT. The time now is 19:46.