Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #160568

Re: sudo does not respond to settings in /etc/sudoers

From Joe <joe@jretrading.com>
Newsgroups linux.debian.user
Subject Re: sudo does not respond to settings in /etc/sudoers
Date 2015-11-14 21:10 +0100
Message-ID <quPj4-8s-5@gated-at.bofh.it> (permalink)
References <quEnD-1CH-5@gated-at.bofh.it> <quK9H-5bz-1@gated-at.bofh.it> <quNKi-7vX-7@gated-at.bofh.it>
Organization JRE Trading Ltd

Show all headers | View raw


On Sat, 14 Nov 2015 13:20:19 -0500
Ric Moore <wayward4now@gmail.com> wrote:

> On 11/14/2015 09:36 AM, Mario Castelán Castro wrote:
> > El 14/11/15 a las 02:11, Ken Heard escribió:  
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> In my Wheezy box I want to be able to run any root command as my
> >> user without having to enter a password to do so.  I assume that
> >> there are two ways to do so: either make my user a member of the
> >> sudo group, or add a line to sudoers giving such privileges to my
> >> user.  Neither worked.  
> >
> > You have to add the "NOPASSWD" option. Check the "sudoers" man
> > page.  
> 
> Add your user to the sudo group like this in /etc/group :
> sudo:x:27:ric
> ...using your own user name. Then it will work, if you added your
> user to /ect/sudoers like:
> # User privilege specification
> root	ALL=(ALL:ALL) ALL
> ric	ALL=(ALL:ALL) ALL
> 
> 
> ...works for me(tm)  :)Ric
> 
> 
> 

The OP did explicitly say he wanted to use the NOPASSWD option, and his
sudoers file shows it in use, currently commented. Your example will
still ask for a password, and anyway it's either/or: you can either add
yourself to the sudo group or add your name to sudoers, you don't need
both. The sudo group is just a quick and simple way of giving the same
set of [presumably low-level] privileges to a number of people, and
the sudo sudoers entry really shouldn't be NOPASSWD, as by default it
gives full root privileges.

I don't use NOPASSWD myself, so I can't give a definitive answer (as
in 'this works for me') to the question, but presumably there's a
semantic issue somewhere. Visudo can only pick up syntax errors, it
can't tell what you meant to achieve. 

-- 
Joe

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

sudo does not respond to settings in /etc/sudoers Ken Heard <kenslists@teksavvy.com> - 2015-11-14 09:30 +0100
  Re: sudo does not respond to settings in /etc/sudoers Mario Castelán Castro  <marioxcc.MT@yandex.com> - 2015-11-14 15:40 +0100
    Re: sudo does not respond to settings in /etc/sudoers Ric Moore <wayward4now@gmail.com> - 2015-11-14 19:30 +0100
      Re: sudo does not respond to settings in /etc/sudoers Joe <joe@jretrading.com> - 2015-11-14 21:10 +0100
        Re: sudo does not respond to settings in /etc/sudoers Ric Moore <wayward4now@gmail.com> - 2015-11-15 16:50 +0100
          Re: sudo does not respond to settings in /etc/sudoers Joe <joe@jretrading.com> - 2015-11-15 17:20 +0100
            Re: sudo does not respond to settings in /etc/sudoers Ric Moore <wayward4now@gmail.com> - 2015-11-15 17:30 +0100
          Re: sudo does not respond to settings in /etc/sudoers Teemu Likonen <tlikonen@iki.fi> - 2015-11-15 17:30 +0100
            Re: sudo does not respond to settings in /etc/sudoers Ken Heard <kenslists@teksavvy.com> - 2015-11-16 08:00 +0100
              Re: sudo does not respond to settings in /etc/sudoers Andreas Henriksson <andreas@fatal.se> - 2015-11-16 13:10 +0100
                Re: sudo does not respond to settings in /etc/sudoers Ken Heard <kenslists@teksavvy.com> - 2015-11-16 15:40 +0100
              Re: sudo does not respond to settings in /etc/sudoers Teemu Likonen <tlikonen@iki.fi> - 2015-11-16 15:20 +0100
  Re: sudo does not respond to settings in /etc/sudoers Teemu Likonen <tlikonen@iki.fi> - 2015-11-14 21:30 +0100

csiph-web