Gentoo Archives: gentoo-user

From: maxim wexler <blissfix@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: two identical /etc/sudoers -- only one works
Date: Sat, 26 May 2007 03:20:18
Message-Id: 493616.69169.qm@web31713.mail.mud.yahoo.com
In Reply to: [gentoo-user] Re: two identical /etc/sudoers -- only one works by Christer Ekholm
1 > Example:
2 >
3 > $ pwd
4 > /usr/bin
5 > $ ls -li sudo
6 > 8803772 ---s--x--x 2 root root 107240 2007-05-21
7 > 11:11 sudo*
8 > $ find . -inum 8803772
9 > ./sudo
10 > ./foo
11 > $ ls -li foo
12 > 8803772 ---s--x--x 2 root root 107240 2007-05-21
13 > 11:11 foo*
14 >
15 >
16 > Unfortunately I do not know what's wrong, try to
17 > strace sudo to see
18 > what it does, remember that you have to bee root to
19 > strace a setuid
20 > program. Look for
21 >
22 > open("/etc/sudoers", O_RDONLY) = 4
23 >
24 > The 4 is what filedescriptor open returned, and is
25 > -1 for a failed
26 > open.
27 >
28
29 strace:
30 <...>
31 open("/etc/sudoers", O_RDONLY) = -1 EACCES
32 (Permission denied)
33 geteuid32() = 1
34 setresuid32(0, 0, 0) = 0
35 write(2, "sudo: ", 6sudo: ) = 6
36 write(2, "can\'t open /etc/sudoers", 23can't open
37 /etc/sudoers) = 23
38 write(2, ": ", 2: ) = 2
39 write(2, "Permission denied\n", 18Permission denied
40 ) = 18
41 <...>
42
43 picky@localhost /usr/bin $ ls -li sudo
44 314108 ---s--x--x 2 root root 106160 Apr 11 09:26 sudo
45 picky@localhost /usr/bin $ find . -inum 314108
46 ./sudo
47 ./sudoedit
48 picky@localhost /usr/bin $ ls -li sudoedit
49 314108 ---s--x--x 2 root root 106160 Apr 11 09:26
50 sudoedit
51 picky@localhost /usr/bin $
52
53 Just noticed this:
54
55 picky@localhost ~ $ ls /
56 ls: cannot open directory /: Permission denied
57 picky@localhost ~ $
58
59 picky can't even mount a floppy or write to it!
60
61 But picky's fstab is identical to heathen's.
62
63 Only thing I can think of: recently had to do emerge
64 --metadata on account of CacheCorruption error.
65
66
67
68
69
70 ____________________________________________________________________________________
71 Sucker-punch spam with award-winning protection.
72 Try the free Yahoo! Mail Beta.
73 http://advision.webevents.yahoo.com/mailbeta/features_spam.html
74 --
75 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Re: two identical /etc/sudoers -- only one works "Boyd Stephen Smith Jr." <bss03@××××××××××.net>
[gentoo-user] Re: two identical /etc/sudoers -- only one works Christer Ekholm <che@××××××.se>
Re: [gentoo-user] Re: two identical /etc/sudoers -- only one works Paul Varner <fuzzyray@g.o>