Page 1 of 1

[SOLVED] How to use sudo to run ALL commands requiring root

PostPosted: Dec 1st, '12, 19:01
by simonhoare
In spite of adding myself to the group "wheel" and to the sudoers file, as well as uncommenting the wheel line in the sudoers file, I find I am still asked for the actual root password when doing certain tasks e.g. opening the Mageia Control Center.

It would be preferable to avoid this and use sudo for everything requiring root privileges.

Re: How to use sudo to run ALL commands requiring root

PostPosted: Dec 1st, '12, 19:28
by digigold
You probably have this line:
Code: Select all
 %wheel        ALL=(ALL)       ALL


You should have this line:
Code: Select all
 %wheel        ALL=(ALL)       NOPASSWD: ALL

Re: How to use sudo to run ALL commands requiring root

PostPosted: Dec 1st, '12, 19:34
by simonhoare
Ok thanks but just to be clear, I still want to be asked for a password. Just the user password and not the one for root.

Re: How to use sudo to run ALL commands requiring root

PostPosted: Dec 1st, '12, 19:42
by digigold
simonhoare wrote:Ok thanks but just to be clear, I still want to be asked for a password. Just the user password and not the one for root.

Then remove the user from the wheel group and under visudo comment the two aforementioned wheel lines out goto the line below:
Code: Select all
root    ALL=(ALL)       ALL

and if your UN=simon add:
Code: Select all
simon    ALL=(ALL)       ALL

(Don't remove the root line BTW!)
This should require simon's PW when sudo is run from that account.

Re: How to use sudo to run ALL commands requiring root

PostPosted: Dec 1st, '12, 19:42
by doktor5000
If you use sudo or the Mageia tools? For the latter, in MCC go to Security -> Configure authentication for Mageia tools
or call it directly via draksec. The authentication of drakxtools has nothing to do with sudo configuration.

Re: How to use sudo to run ALL commands requiring root

PostPosted: Dec 1st, '12, 19:51
by simonhoare
Ah really? Suspected that a little bit, having set up sudo on other distros.

Sudo works as it should. It was really more to avoid using root password at all for daily work. I've seen the authentification options in MCC now and maybe I'll leave those alone until I've worked out the consequences.

Re: How to use sudo to run ALL commands requiring root

PostPosted: Dec 1st, '12, 20:30
by doktor5000
Care to mark the thread accordingly by editing the topic of the first post and prefix it by [SOLVED], thanks.