Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got a rather strange problem with sudo. Basically, it authenticates, but sometimes just doesn't launch the command provided. For example:

liori@marvin:~$ sudo whoami
root
liori@marvin:~$ sudo whoami
root
liori@marvin:~$ sudo whoami
liori@marvin:~$ sudo whoami
liori@marvin:~$ sudo whoami
liori@marvin:~$ 

I wrote a test case which demonstrates this problem:

liori@marvin:~$ sudo whoami; for i in `seq 100`; do echo -n ':' ; sudo whoami ; done ; echo
root
::::::::::::root
:::::root
:::::root
:::::::::::root
::::::::::root
::::::::::::::::::::::::::::::::root
:::root
::::root
::::root
:::root
:::root
::root
:root
:::::
liori@marvin:~$ 

Of course, the expected output is a series of lines, each one starting with exactly one colon character. I don't have any clue where to begin debugging this problem.

For each attempt (whether the command was actually run or not), I get an entry in syslog:

Apr 11 19:47:40 marvin systemd-logind[806]: New session c1079 of user root.
Apr 11 19:47:40 marvin systemd-logind[806]: Removed session c1079.

This is Debian SID. I started observing this behavior few days ago, after a somewhat bigger update (I update this system maybe once a month), and after moving the system from one hard disk to another (using rsync -av --del).

Any help will be appreciated.

share|improve this question
1  
I'm curious how strace -f sudo whoami varies from a good run to a bad run... –  Kyle Smith Apr 11 '12 at 18:30

2 Answers 2

Sid is still not stable, it might be a bug, I suggest you submit it to Debian here.

share|improve this answer
    
Must be a bug yes. I always use debian stable, with some newer packages added through backports. And the most important thing it does is honouring its designation, i.e. stable. It's the most rock solid linux distro I have used. –  aseq Apr 12 '12 at 0:02
up vote 2 down vote accepted

Bug already filled. Workaround:

In my case I've changed /etc/pam.d/login and /etc/pam.d/gdm3* and added a line

session required        pam_loginuid.so

just before @include common-session

(from Michael Biebl's response)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.