Stopping the system asking for root password

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Stopping the system asking for root password

Postby GeordieJedi » Mon Feb 11, 2013 3:06 pm

Hi all.

OK, I'd like to stop my system from asking for the root password whenever I try
to run apps or elevate privaliges.
(I realise that this is normal and how things "should" be done,
however I've got really bad RSI and every little bit helps).

I also understand the security implications this involves too.

I've asked something similar previously =
here

And was asked to edit the sudoers file using visudo and alter
the line in question to =
Code: Select all
%admin ALL=(ALL) NOPASSWD: ALL


However even though I've done this
(And I'm pretty sure it was done properly - I went in and checked the
file running Gedit as root. However I only viewed the file I didn't edit it using Gedit).


At the moment I still get the request come up if I do any of the following -
I run Gparted.
I run a terminal session (and then ask for a root session).
I run GUFW.
Run Ubuntu software centre.


Is there anything I've done incorrectly, or anything else that I need to do ?

Useful information =

OS = Ubuntu 12.04
DE = KDE


TIA for any help or advice.
User avatar
GeordieJedi
LXF regular
 
Posts: 337
Joined: Thu Jun 14, 2007 10:36 pm
Location: North East England

Postby MartyBartfast » Mon Feb 11, 2013 3:58 pm

Are you in the admin group?

Code: Select all
$ id


will show which groups you're in

Code: Select all

$ sudo  usermod -aG admin GeordiJedi



should add you to it if not.
I have been touched by his noodly appendage.
User avatar
MartyBartfast
LXF regular
 
Posts: 819
Joined: Mon Aug 22, 2005 7:25 am
Location: Hants, UK

Postby xenopeek » Mon Feb 11, 2013 5:31 pm

You could take a hint from the sudoers file in the live session. I don't have Ubuntu 12.04, but the Linux Mint 13 based on that. Probably very similar. Here are the relevant bits:
Code: Select all
# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
mint  ALL=(ALL) NOPASSWD: ALL

So what you want is to see the %sudo line be as above, make sure you are a member of sudo group (type "groups" in terminal to confirm) and add that last line with sudo visudo, replacing mint with your username.

Unless there is some further hidden configuration, that should work, right?

Good luck with getting RSI under control; and don't let it get worse...
Linux Mint 14 Nadia / 64-bit / Cinnamon
User avatar
xenopeek
 
Posts: 34
Joined: Mon Dec 24, 2012 1:19 pm

Postby GeordieJedi » Mon Feb 11, 2013 6:57 pm

Hi there.

Right here are the results of the questions that you asked -

Command =
Code: Select all
id


Answer =
Code: Select all
uid=1000(myname)
gid=1000(myname)
groups=1000(myname)
4(adm), 24(cdrom), 27(sudo), 30(dip), 46(plugdev),
109(lpadmin),124(sambashare)


Command =
Code: Select all
groups


Answer =
Code: Select all
(myname) adm cdrom sudo dip plugdev lpadmin sambashare



Thanks for the help so-far Martyartfast and Xenopeek
User avatar
GeordieJedi
LXF regular
 
Posts: 337
Joined: Thu Jun 14, 2007 10:36 pm
Location: North East England

Postby MartyBartfast » Mon Feb 11, 2013 9:13 pm

So in your original post you added sudo rights to members of the admin group, however you are not in the admin group, however you are in the adm and sudo groups, so I would suggest that you use visudo to change

Code: Select all
%admin ALL=(ALL) NOPASSWD: ALL


to

Code: Select all
%adm ALL=(ALL) NOPASSWD: ALL


or add this

Code: Select all
# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL


(just edited this having read Xenopeek's reply).
I have been touched by his noodly appendage.
User avatar
MartyBartfast
LXF regular
 
Posts: 819
Joined: Mon Aug 22, 2005 7:25 am
Location: Hants, UK

Postby GeordieJedi » Wed Feb 13, 2013 3:14 pm

Right then.

I've done as you suggested in your previous posts
(Added those extra lines to the sudoers file)

So far, I can get a root prompt in the terminal without being asked for a PW
However if I try Gparted or try to download any software, from the
Ubuntu software centre I then get asked for my PW.

Strange......
User avatar
GeordieJedi
LXF regular
 
Posts: 337
Joined: Thu Jun 14, 2007 10:36 pm
Location: North East England

Postby Rhakios » Wed Feb 13, 2013 6:36 pm

GeordieJedi wrote:Right then.

I've done as you suggested in your previous posts
(Added those extra lines to the sudoers file)

So far, I can get a root prompt in the terminal without being asked for a PW
However if I try Gparted or try to download any software, from the
Ubuntu software centre I then get asked for my PW.

Strange......


Not necessarily, if you're launching from a menu or icon, a lot of them include gksu or pkexec, or something similar, as part of the command and this will bring up the authorisation dialog.
Bye, Rhakios
User avatar
Rhakios
Moderator
 
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Postby GeordieJedi » Sat Feb 16, 2013 12:20 am

Ah-Ha, I see.

So is there any way to stop the system for asking for a root PW in
these instances too ?
User avatar
GeordieJedi
LXF regular
 
Posts: 337
Joined: Thu Jun 14, 2007 10:36 pm
Location: North East England


Return to Help!

Who is online

Users browsing this forum: No registered users and 1 guest