sudo pause or delay

Discussion in 'Server Operation' started by v2k, Feb 2, 2009.

  1. v2k

    v2k New Member

    If I run "sudo ls" for example, it pauses for about 2 minutes before running the command. It does this for anything I run via sudo. I have no idea where to start looking... :(
  2. v2k

    v2k New Member

    12hrs later the problem seems to have disappeared, I haven't changed anything or rebooted...
  3. v2k

    v2k New Member

    And, it's back. I tried strace, but nothing useful came of that. Any suggestions on debugging this?
  4. falko

    falko Super Moderator ISPConfig Developer

    What distribution are you using? Any errors in your logs?
  5. marpada

    marpada New Member

    Last edited: May 13, 2011
  6. v2k

    v2k New Member

    My bad, I'm using fedora:

    The problem comes and goes which is very frustrating.

    The error_log, messages doesn't have anything of note. I couldn't find anything in the logs.
  7. falko

    falko Super Moderator ISPConfig Developer

    Strange. But you could log in directly as root - you don't have to use sudo then.
  8. v2k

    v2k New Member

    Indeed, but then I lose all my configs: bash, vim, etc.
  9. aporter

    aporter New Member

    I've been plagued by this problem for months on my Ubuntu server, and I think I finally figured it out. Looking in the /etc/pam.d/ directory to see what happens when I try to sudo, I see that it calls a pam module called ecryptfs. I commented that line out, since I do not have any encrypted home directories. The problem seems to have disappeared.

    Like several others before me, I have had trouble re-creating the problem on demand, since it seemed to delay the first time I sudo, but then it goes quickly for the next few hours. I managed to get the delay problem to occur repeatedly by doing "sudo -K" so it would "forget", and then my test, either "sudo -i" to get a shell or "time sudo pwd" to show me how much time it's taking (usually about 20 seconds).

    I hope this points others in the right direction. I plan to submit this as a bug on the Ubuntu site, once I can figure out what category to put it in.

    Alan Porter

Share This Page