I've been having a major problem with logging in as a non-root user from agetty. It turns out that removing pam_console from the specifications in /etc/pam.d/login fixes the problem. Reproducible: Always Steps to Reproduce: 1. Bootstrap from stage 1 (probably not necessary at all) 2. Ensure pam_console is specified in /etc/pam.d/login 3. Attempt to log in as a non-root user. Actual Results: Password checking appears to work as it should, and a syslog message is entered saying that a "session" has been opened by PAM. After a brief delay, the system drops back to agetty. Expected Results: Logged in the user. Portage 2.0.50-r1 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.2-r9, 2.6.4) ================================================================= System uname: 2.6.4 i686 AMD Athlon(tm) XP 3000+ Gentoo Base System version 1.4.3.13 Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -pipe -fstack-protector -m3dnow -fexpensive-optimizations -fcse-skip-blocks -fforce-mem -fno-crossjumping -fno-delayed-branch" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -pipe -fstack-protector -m3dnow -fexpensive-optimizations -fcse-skip-blocks -fforce-mem -fno-crossjumping -fno-delayed-branch" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa apm arts avi berkdb crypt cups encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 imlib jpeg kde libg++ libwww mad mikmod motif mozilla mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xv zlib" sys-libs/pam Latest version available: 0.77 Latest version installed: 0.77 Size of downloaded files: 3,551 kB Homepage: http://www.kernel.org/pub/linux/libs/pam/ Description: Pluggable Authentication Modules License: PAM * sys-apps/pam-login Latest version available: 3.14 Latest version installed: 3.14 Size of downloaded files: 137 kB Homepage: http://www.thkukuk.de/pam/pam_login/ Description: Based on the sources from util-linux, with added pam and shadow features License: GPL-2
I've been havein similar problems with [xg]dm but login works fine though. When a user login using [xg]dm and pam_console is enabled in their pam configs /dev/null is altered. The following seems to be happening login: chown user /dev/null chmod 660 /dev/null logout: chgrp floppy /dev/null This seems very strange to me =P I have tried to hunt this down with strace, but I can't find the right process to strace. Any tip on how to proceed? I have: sys-libs/pam-0.77-r1 sys-fs/udev-025-r1 sys-kernel/gentoo-dev-sources-2.6.5-r1
I solved the problem, mine at least. I had put a line in /etc/fstab calling /dev/fd/0 the device to mount at /mnt/floppy... /dev/fd0 should it be! Strange errors from such a small spelling error. =)
Default is now pam_console disabled. PS, pam_console do not touch /dev/null by default due to console.perms file, so it might be something else.
Well /dev/fd/0 beeing the special file it is and all actually made pam_console change /dev/null. just don't do it =)