Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stopping the system asking for root password

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
GeordieJedi
LXF regular


Joined: Thu Jun 14, 2007 11:36 pm
Posts: 335
Location: North East England

PostPosted: Mon Feb 11, 2013 3:06 pm    Post subject: Stopping the system asking for root password Reply with quote

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:
%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.
Back to top
View user's profile Send private message
MartyBartfast
LXF regular


Joined: Mon Aug 22, 2005 8:25 am
Posts: 814
Location: Hants, UK

PostPosted: Mon Feb 11, 2013 3:58 pm    Post subject: Reply with quote

Are you in the admin group?

Code:

$ id


will show which groups you're in

Code:


$ sudo  usermod -aG admin GeordiJedi



should add you to it if not.
_________________
I have been touched by his noodly appendage.
Back to top
View user's profile Send private message
xenopeek



Joined: Mon Dec 24, 2012 1:19 pm
Posts: 34

PostPosted: Mon Feb 11, 2013 5:31 pm    Post subject: Reply with quote

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:
# 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
Back to top
View user's profile Send private message
GeordieJedi
LXF regular


Joined: Thu Jun 14, 2007 11:36 pm
Posts: 335
Location: North East England

PostPosted: Mon Feb 11, 2013 6:57 pm    Post subject: Reply with quote

Hi there.

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

Command =
Code:
id


Answer =
Code:
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:
groups


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



Thanks for the help so-far Martyartfast and Xenopeek
Back to top
View user's profile Send private message
MartyBartfast
LXF regular


Joined: Mon Aug 22, 2005 8:25 am
Posts: 814
Location: Hants, UK

PostPosted: Mon Feb 11, 2013 9:13 pm    Post subject: Reply with quote

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:

%admin ALL=(ALL) NOPASSWD: ALL


to

Code:

%adm ALL=(ALL) NOPASSWD: ALL


or add this

Code:

# 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.
Back to top
View user's profile Send private message
GeordieJedi
LXF regular


Joined: Thu Jun 14, 2007 11:36 pm
Posts: 335
Location: North East England

PostPosted: Wed Feb 13, 2013 3:14 pm    Post subject: Reply with quote

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......
Back to top
View user's profile Send private message
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7627
Location: Midlands, UK

PostPosted: Wed Feb 13, 2013 6:36 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
GeordieJedi
LXF regular


Joined: Thu Jun 14, 2007 11:36 pm
Posts: 335
Location: North East England

PostPosted: Sat Feb 16, 2013 12:20 am    Post subject: Reply with quote

Ah-Ha, I see.

So is there any way to stop the system for asking for a root PW in
these instances too ?
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast