# su, sudo & login hangs

## zrajm

A while after boot (5-15 minutes) logging in stops working completely. After typing login name & password at the console nothing happens (and after a minute or so, the login propt return "login:" -- after some sort of timeout I guess).

When this happens su, and sudo stops working as well, so I'm guessing it is a PAM-related problem. (But when I look in the logs, there's no indication of anything actually happening on a failed login/su/sudo... Nothing is written in the logs, at all. Could there be something wrong with whatever-the-thingy-is that should invoke PAM?)

(su: I type "su" in an xterm or on the console, and it prompts for "Password:" after typing a password [valid or invald -- gives the same response] nothing happens. If I press Ctrl-C I get back to the shell prompt)

(sudo: Pretty much acts the same way as "su", except that I cannot press Ctrl-C to return to my xterm or console. So that shell is essentially f**ckd. -- Also note, that this behaviour occur even if I try to use "su" or "sudo" as root..)

The weird thing is that everything works fine the first 5-15 minutes after boot, and then suddenly just stops.

I'm compiling a new (gentoo-sources-2.4.25-r2) kernel from scratch, and it is when booting this kernel that the problem occur. When using my old (gentoo-sources-2.4.20-r7) everything works fine. -- Though I remeber having the same problem with that kernel about six months ago, when I first compiled & installed it... But the time after which it stopped working was maybe 1-2 hours then. (And, of course, I do not remember how I fixed the problem then. -- Sigh.)

The fact that the same thing has happened to me twice makes me believe that this could be some fairly common problem (or common misstake?). But what?

Am I forgetting to enable some obvious kernel thingy? Or is there a software package that needs updating to work properly with my new(er) kernel?

I could provide a diff between the /usr/src/linux/.config used for the two kernels in question, but it's almost 800 lines long...

----------

## moocha

Could be a DNS timeout issue as well.

----------

## zrajm

After testing a bit more I found that the su/sudo/login problem appear, not after reboot as such, but after running adsl-start to connect to the internet ("adsl-start" is part of the rp-ppoe package [net-dialup/rp-pppoe-3.5], which is run as root).

I'm using a USB ADSL modem (D-Link DSL-200 USB ADSL modem), for which I have the portages, ppp (version 2.4.1-r14), rp-pppoe (version 3.5) and eciadsl-usermode (version 0.8) installed. Now, I can't really say that I understand how this actually work, but it *does work* when I'm running my old kernel.

BTW: Another progam that refuses to start when the problem shows itself is galeon (but any running instance of galeon, happily continues to run with no problems whatsoever) -- however dillo starts & runs just fine.

Also, when this occur I can no longer run "halt" or "reboot", even in a root console. All I get is:

```

Broadcast message from root (pts/1) (Mon May 10 05:30:20 2004):

The system is going down for system halt NOW!

```

(the above text is shown on all terminals, as usual) and after that I get a new prompt. No halting or rebooting occurs.

----------

## zrajm

 *moocha wrote:*   

> Could be a DNS timeout issue as well.

 

What? How could that ever affect my "sudo"s? And how can I test if this is the case?

----------

## zrajm

I just can't believe that no-one else has experienced this. Today (one month after initially reporting the bug) I'm using a totally different machine (only the hard disk remains the same) and a totally different kernel (2.6.5, instead of 2.4.25), and still this problem persists.

I doesn't look as the ADSL connection is the culprit, however, since the problem sometimes occur even before I've connected to the net. It looks more as if it has something to do with the *number* of programs I start from /etc/init.d/. If I use rc-update to cut *way* down on the number of rc-update scripts that are started on boot, the problem vanishes. However, if I fire them up manually (using "/etc/init.d/<whatever> start") the problem soon appears again.

The only thing I do which may be somewhat unusal and exotic (and which could possibly explain why I am so alone in eperiencing this) that I can think of is that I use the "setmax" command. -- I have "softclipped" my 120Gb HD, so that it reports itself as a ~33Gb disk (I think, it was a while ago I set this up) to the BIOS (both machines are from -98, and the BIOS hang at boot if the HD are larger than this). Then during the boot sequence the command "setmax -d 0 /dev/hda" is issued restoring the HD capacity.

Or could it possibly be that some installed portage package that the system really depends on is out of sync with some other package? If so? Which ones? How do I spot that?

----------

## richard.scott

Hi, just to put your mind at east, I have just fully updated my system to the latest everything using emerge --newuse -uDv world and I now have the same problem. 

I can't log on as *any* user as after typing in the username at the "login:" prompt I get booted straight back to it as if the login binary has been told not to let anyone login via the console.

I don't have to wait for this to happen, it is broken like this as soon as the machine has finished booting 

I have never used the ACCEPT_KEYWORDS option in my make.conf file so I have no idea what could be causing this.

I believe it is also something to do with PAM, but what I have no idea.

I am going to try and remove PAM and recompile everything with the "-pam" in /etc/make.conf to see if this helps.

I'll let you know how I get on.  :Sad: 

----------

## zrajm

This problem simply went away some (by now, quite a long) time ago. If I remember correctly, the problem vanished after a kernel upgrade. But it was a hectic time and I more or less recompiled everything, so I can't know for sure.

Still, it was annoying. And I do never ever want this to happen to me again. So if anyone has any suggestion as to what might have caused this I'm all ears.

----------

## theDreamer

I suffer from the same problem.

performed emerge -vuD system and kernel recompilation withoug any success.

it doesn't happen all the time, only after a long period that the computer is up (above 1 day).

----------

## theDreamer

https://forums.gentoo.org/viewtopic.php?t=99009&highlight=login+timeout+pam

----------

