[Pkg-shadow-devel] Bug#476519: Bug#476519: shell-mode garbles input

Stephane Chazelas Stephane_Chazelas at yahoo.fr
Fri May 2 10:41:15 UTC 2008


On Fri, May 02, 2008 at 06:08:41AM +0800, jidanni at jidanni.org wrote:
> As http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476519 says, maybe
> it is a bash bug: with Debian sid's BASH_VERSION=3.2.33(1)-release
> about half the time the below works normally, the other half some
> magic hand sends "exit" to it, logging me out right away. The first
> letter of which gets bitten off or something, here in an emacs shell window:
> 03:44 ~# env - su - nobody
> bash: xit: command not found
> (I do not have the bash-completion package installed, as per
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468858 )

Try

sudo env -i SHELLOPTS=xtrace su -p - nobody

nobody's shell is sh (being bash) or bash, right?

$ getent passwd nobody
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh

$ dpkg -S "$(command -v su)"
login: /bin/su

Which su is your su? Is it using PAM?

$ ldd /bin/su
        linux-gate.so.1 =>  (0xb8021000)
        libpam.so.0 => /lib/libpam.so.0 (0xb7fed000)
        libpam_misc.so.0 => /lib/libpam_misc.so.0 (0xb7fea000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7e9c000)
        libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7e98000)
        /lib/ld-linux.so.2 (0xb8022000)

$ grep '^[^#]' /etc/pam.d/su
auth       sufficient pam_rootok.so
session       required   pam_env.so readenv=1
session       required   pam_env.so readenv=1 envfile=/etc/default/locale
session    optional   pam_mail.so nopen
@include common-auth
@include common-account
@include common-session

(also check the included files).

-- 
Stéphane





More information about the Pkg-shadow-devel mailing list