[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

solved: sudo doesn't ask for passwd



Hi
Sometime ago I filed a bugreport and l8r I also posted here a msg. That sudo
shows some strange behaviour.
I was NEVER asked for a passwd, but thrown right into a rootshell.

My /etc/sudoers just looks like this:

# User privilege specification
root    ALL=(ALL) ALL
%sudo   ALL=(ALL) ALL

(pretty normal, eh?)

I just couldn't give up on this, so I had a look in the sourcepackage where I
saw that (in check.c):

int user_is_exempt()
{
#ifdef EXEMPTGROUP
    struct group *grp;
    char **gr_mem;

    if ((grp = getgrnam(EXEMPTGROUP)) == NULL)
        return(FALSE);

aha ... so no passwd is asked for a group called EXEMPTGROUP.
I then did a grep and found this:

17:50:50/tmp/sudo-1.5.4 %grep EXEMPTGROUP *.{c,h}
check.c:#ifdef EXEMPTGROUP
check.c:    if ((grp = getgrnam(EXEMPTGROUP)) == NULL)
options.h:#define EXEMPTGROUP "sudo"    /* no passwd needed for users in this
group */


ARGL ... it was just the groupname. (however sudo is installed by the sudo
package

Setting up a group wheel:x:28: aaaaaand .....


17:53:35~ %id                               alex@Aleph(p4)[769|0]Sat-23-01-1999
uid=500(alex) gid=500(alex) groups=500(alex),4(adm),5(tty),9(news),10(uucp),20(dialout),21(fax),25(floppy),28(wheel),29(audio),30(dip),39(irc),40(src),50(staff),100(users)
17:53:37~ %sudo -s                          alex@Aleph(p4)[770|0]Sat-23-01-1999

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these two things:

        #1) Respect the privacy of others.
        #2) Think before you type.

Password:



BINGO :)


Shall I file again a bugreport or is this intented? I think it should then be
documented that sudo is never asked for a passwd.


Greetings
-- 
Alexander N. Benner -*- Nikodemus@innocent.com -*- Ephesians 6:12 , John 1:5 

She relaxed just a little, [..] "I'm hardly presentable..." [..] Hardly
presentable! Wasn't it strange, the way humans looked at themselves with eyes
of flesh [..] But to the angels, she appeared as God Himself saw her, just as
any other redeemed saint of the living God: pure, shining, clean, dressed in
garments as white as snow.          PIERCING THE DARKNESS by Frank E. Peretti


Reply to: