[sudo-users] Strange sudo for root user

Gerhard Brauer gerhard.brauer at web.de
Sat Dec 18 08:46:58 EST 2010


On Mon, Dec 06, 2010 at 06:13:57PM +0100, Gerhard Brauer wrote:
> On Mon, Dec 06, 2010 at 11:39:43AM -0500, Todd C. Miller wrote:
> > Sudo relies on group permissions to open the sudoers file by default
> > to avoid issues with NFS.  I don't know why it would fail to open
> > sudoers unless the "root" group on the machine in question does not
> > have gid 0.
> > 
> > What does "ls -n /etc/sudoers" show?
> 
> I could not provide the output exactly cause the user AFAIK will try
> to install the x86_64 system to see if it works on this
> architecture for him.
> 

We ran a second time into the same problem. A user installed x86_64
on ext4, the harddisk is a SSD drive.

Calling sudo as root give exact the same error as in my first post.
This time i have a ltrace from it (ltrace -fS -o /tmp/sudo.log /usr/bin/sudo):
http://pastebin.com/FhtriSZh

The error happens here (Line 499 ff.):
----------------------------
6346 SYS_setresuid(0, 1, 0)                                                           = 0
6346 <... setresuid resumed> )                                                        = 0
6346 fopen("/etc/sudoers", "r" <unfinished ...>
6346 SYS_open("/etc/sudoers", 0, 0666)                                                = -13
6346 <... fopen resumed> )                                                            = 0
6346 __errno_location()                                                               = 0x7fcb2aa526a8
      ^^^^^^^^^^^^^^^^^^^^^^
6346 setresuid(0, 0, 0, 114032, 0x7fcb2aa52700 <unfinished ...>
6346 SYS_setresuid(0, 0, 0)                                                           = 0
6346 <... setresuid resumed> )
--------------------------------

But that is silly! Of course the /etc/sudoers is available:
---------------------------
[root at thematrix etc]# stat /etc/sudoers
  File: „/etc/sudoers"
  Size: 2873          Blocks: 8          IO Block: 4096   reguläre Datei
Device: 812h/2066d    Inode: 33426       Links: 1
Access: (0440/-r--r-----)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2010-12-17 18:07:07.000000000 +0100
Modify: 2010-12-17 18:07:07.000000000 +0100
Change: 2010-12-17 18:07:07.000000000 +0100
 Birth: -
[root at thematrix etc]# stat /usr/bin/sudo
  File: „/usr/bin/sudo"
  Size: 192672        Blocks: 392        IO Block: 4096   reguläre Datei
Device: 812h/2066d    Inode: 311908      Links: 2
Access: (4111/---s--x--x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2010-12-14 23:05:50.000000000 +0100
Modify: 2010-09-09 07:23:31.000000000 +0200
Change: 2010-12-14 23:05:50.000000000 +0100
 Birth: -
--------------------------------

I'm not a developer but AFAIK this sounds more like a
kernel/filesystem problem cause sudo will use fopen to get a file
descriptor, but the kernel says: Could not find it... But the FS is
ok and this thing with sudo is the only problem which occurs so
far...

The first user with the problem has done another fresh installation,
uses ext4 instead of ext3 and this third time it works for him.

Meanwhile i have tried several new installs but whatever i do on
"mistakes" i could not reproduce this szenario...

Any ideas/hints from anyone's side?

Regards
        Gerhard




More information about the sudo-users mailing list