public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Problem with "su -" and kernels 2.4.3-ac11 and higher
@ 2001-04-22 17:22 Manuel McLure
  2001-04-22 21:38 ` Andrzej Krzysztofowicz
  2001-04-23 16:03 ` Lukasz Trabinski
  0 siblings, 2 replies; 17+ messages in thread
From: Manuel McLure @ 2001-04-22 17:22 UTC (permalink / raw)
  To: linux-kernel

I'm having a problem with "su -" on ac11/ac12. ac5 doesn't show the
problem.
The problem is easy to reproduce - go to a console, log in as root, do an
"su -" (this will succeed) and then another "su -". The second "su -"
should hang - ps shows it started bash and that the bash process is
sleeping. You need to "kill -9" the bash to get your prompt back.

Distribution is Red Hat 7.1, running on an Athlon Thunderbird 900MHz on a
MSI K7T Turbo R motherboard.

Thanks,
-- 
Manuel A. McLure KE6TAW | ...for in Ulthar, according to an ancient
<manuel@mclure.org>     | and significant law, no man may kill a cat.
<http://www.mclure.org> |             -- H.P. Lovecraft


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-22 17:22 Problem with "su -" and kernels 2.4.3-ac11 and higher Manuel McLure
@ 2001-04-22 21:38 ` Andrzej Krzysztofowicz
  2001-04-23  2:25   ` Manuel McLure
  2001-04-23 16:03 ` Lukasz Trabinski
  1 sibling, 1 reply; 17+ messages in thread
From: Andrzej Krzysztofowicz @ 2001-04-22 21:38 UTC (permalink / raw)
  To: Manuel McLure; +Cc: kufel!vger.kernel.org!linux-kernel

> 
> I'm having a problem with "su -" on ac11/ac12. ac5 doesn't show the
> problem.
> The problem is easy to reproduce - go to a console, log in as root, do an
> "su -" (this will succeed) and then another "su -". The second "su -"
> should hang - ps shows it started bash and that the bash process is
> sleeping. You need to "kill -9" the bash to get your prompt back.

No problem here.

P233MMX

# uname -a
Linux kufel 2.4.3-ac12 #2 nie kwi 22 15:32:51 CEST 2001 i586 unknown

# ls -l /lib/libc-*
-rwxr-xr-x   1 root     root      1060168 Nov 19 11:17 /lib/libc-2.1.3.so

# gcc --version
egcs-2.91.66
(kernel with the fix by Niels Kristian Bech Jensen <nkbj@image.dk>)

# su --version
su (GNU sh-utils) 2.0

Maybe it is RH7 specyfic ? Or you have some compiler / hardware problem ?

Andrzej


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-22 21:38 ` Andrzej Krzysztofowicz
@ 2001-04-23  2:25   ` Manuel McLure
  2001-04-23  2:42     ` Brett
                       ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Manuel McLure @ 2001-04-23  2:25 UTC (permalink / raw)
  To: Andrzej Krzysztofowicz; +Cc: linux-kernel


On 2001.04.22 14:38 Andrzej Krzysztofowicz wrote:
> > 
> > I'm having a problem with "su -" on ac11/ac12. ac5 doesn't show the
> > problem.
> > The problem is easy to reproduce - go to a console, log in as root, do
> an
> > "su -" (this will succeed) and then another "su -". The second "su -"
> > should hang - ps shows it started bash and that the bash process is
> > sleeping. You need to "kill -9" the bash to get your prompt back.
> 
> No problem here.
> 
> P233MMX
> 
> # uname -a
> Linux kufel 2.4.3-ac12 #2 nie kwi 22 15:32:51 CEST 2001 i586 unknown
> 
> # ls -l /lib/libc-*
> -rwxr-xr-x   1 root     root      1060168 Nov 19 11:17 /lib/libc-2.1.3.so
> 
> # gcc --version
> egcs-2.91.66
> (kernel with the fix by Niels Kristian Bech Jensen <nkbj@image.dk>)
> 
> # su --version
> su (GNU sh-utils) 2.0
> 
> Maybe it is RH7 specyfic ? Or you have some compiler / hardware problem ?
> 
> Andrzej

Did you try nesting more than one "su -"? The first one after a boot works
for me - every other one fails.
I'm on RH71 - this may be specific to this release. It's also
kernel-dependent, I can reboot with ac5 and the problem does not happen.
The kernel is compiled with the same compiler as yours.

My libc is 2.2.2 while yours is 2.1.3 - this may be the difference.

-- 
Manuel A. McLure KE6TAW | ...for in Ulthar, according to an ancient
<manuel@mclure.org>     | and significant law, no man may kill a cat.
<http://www.mclure.org> |             -- H.P. Lovecraft


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-23  2:25   ` Manuel McLure
@ 2001-04-23  2:42     ` Brett
  2001-04-23  3:20       ` Manuel McLure
  2001-04-23  2:42     ` Wayne Whitney
                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 17+ messages in thread
From: Brett @ 2001-04-23  2:42 UTC (permalink / raw)
  To: Manuel McLure; +Cc: Andrzej Krzysztofowicz, linux-kernel

On Sun, 22 Apr 2001, Manuel McLure wrote:
>
> 
> On 2001.04.22 14:38 Andrzej Krzysztofowicz wrote:
> > > 
> > > I'm having a problem with "su -" on ac11/ac12. ac5 doesn't show the
> > > problem.
> > > The problem is easy to reproduce - go to a console, log in as root, do
> > an
> > > "su -" (this will succeed) and then another "su -". The second "su -"
> > > should hang - ps shows it started bash and that the bash process is
> > > sleeping. You need to "kill -9" the bash to get your prompt back.
> > 

No problem here either...
Tried nesting 7 levels deep, a few times.

p75

# uname -a
Linux lapsis 2.4.3-ac12 #2 Sun Apr 22 17:41:08 EST 2001 i586 unknown

# ls /lib/libc-*
-rwxr-xr-x    1 root     root      1417065 Feb 17 14:57 /lib/libc-2.2.2.so*

# gcc --version
2.95.3

# su --version
su (GNU sh-utils) 2.0j

	/ Brett


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-23  2:25   ` Manuel McLure
  2001-04-23  2:42     ` Brett
@ 2001-04-23  2:42     ` Wayne Whitney
  2001-04-23  3:21       ` Manuel McLure
                         ` (2 more replies)
  2001-04-23  3:01     ` John Cavan
  2001-04-23  9:56     ` Andrzej Krzysztofowicz
  3 siblings, 3 replies; 17+ messages in thread
From: Wayne Whitney @ 2001-04-23  2:42 UTC (permalink / raw)
  To: manuel, Andrzej Krzysztofowicz; +Cc: linux-kernel

In mailing-lists.linux-kernel, Manuel A. McLure wrote:

> Did you try nesting more than one "su -"? The first one after a boot
> works for me - every other one fails.

Same here: the first "su -" works OK, but a second nested one hangs:

 8825 pts/2    S      0:00 /bin/su -
 8826 pts/2    S      0:00 -bash
 8854 pts/2    T      0:00 stty erase ?
 8855 pts/0    R      0:00 ps ax

"kill -CONT 8854" has no effect.  

> I'm on RH71 - this may be specific to this release. It's also
> kernel-dependent, I can reboot with ac5 and the problem does not
> happen.  The kernel is compiled with the same compiler as yours.

I'm RH-7.1 and kernel 2.4.4-pre6 (with the via 3.23 driver from -ac)

Cheers, Wayne

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-23  2:25   ` Manuel McLure
  2001-04-23  2:42     ` Brett
  2001-04-23  2:42     ` Wayne Whitney
@ 2001-04-23  3:01     ` John Cavan
  2001-04-23  9:56     ` Andrzej Krzysztofowicz
  3 siblings, 0 replies; 17+ messages in thread
From: John Cavan @ 2001-04-23  3:01 UTC (permalink / raw)
  To: Manuel McLure; +Cc: Andrzej Krzysztofowicz, linux-kernel

Manuel McLure wrote:
> Did you try nesting more than one "su -"? The first one after a boot works
> for me - every other one fails.

I tried it with about a half-dozen nested and no problem. Mandrake
cooker here...

uname -a
Linux lion 2.4.3-ac11 #5 SMP Fri Apr 20 22:10:41 EDT 2001 i686 unknown

gcc --version 
2.96

ls -l /lib/libc-*
-rwxr-xr-x    1 root     root      1216268 Feb 21 05:38
/lib/libc-2.2.2.so

su --version
su (GNU sh-utils) 2.0

I don't think libc is the problem, unless it is in conjunction with the
compiler choice. Have you tried building the kernel with the updated Red
Hat gcc version? I know Mandrake has kept theirs current to Red Hat and
it works fine for me.

John

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-23  2:42     ` Brett
@ 2001-04-23  3:20       ` Manuel McLure
  0 siblings, 0 replies; 17+ messages in thread
From: Manuel McLure @ 2001-04-23  3:20 UTC (permalink / raw)
  To: Brett; +Cc: linux-kernel


On 2001.04.22 19:42 Brett wrote:
> On Sun, 22 Apr 2001, Manuel McLure wrote:
> >
> > 
> > On 2001.04.22 14:38 Andrzej Krzysztofowicz wrote:
> > > > 
> > > > I'm having a problem with "su -" on ac11/ac12. ac5 doesn't show the
> > > > problem.
> > > > The problem is easy to reproduce - go to a console, log in as root,
> do
> > > an
> > > > "su -" (this will succeed) and then another "su -". The second "su
> -"
> > > > should hang - ps shows it started bash and that the bash process is
> > > > sleeping. You need to "kill -9" the bash to get your prompt back.
> > > 
> 
> No problem here either...
> Tried nesting 7 levels deep, a few times.
> 
> p75
> 
> # uname -a
> Linux lapsis 2.4.3-ac12 #2 Sun Apr 22 17:41:08 EST 2001 i586 unknown
> 
> # ls /lib/libc-*
> -rwxr-xr-x    1 root     root      1417065 Feb 17 14:57
> /lib/libc-2.2.2.so*
> 
> # gcc --version
> 2.95.3
> 
> # su --version
> su (GNU sh-utils) 2.0j
> 
> 	/ Brett
> 

In my case:

# su --version
su (GNU sh-utils) 2.0

# bash --version
GNU bash, version 2.04.21(1)-release (i386-redhat-linux-gnu)

# uname -a
Linux ulthar 2.4.3-ac12 #3 Sat Apr 21 23:15:08 PDT 2001 i686 unknown

# ls -l /lib/libc-*        
-rwxr-xr-x    2 root     root      1236396 Apr  6 14:58 /lib/libc-2.2.2.so

# kgcc --version
egcs-2.91.66


-- 
Manuel A. McLure KE6TAW | ...for in Ulthar, according to an ancient
<manuel@mclure.org>     | and significant law, no man may kill a cat.
<http://www.mclure.org> |             -- H.P. Lovecraft


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-23  2:42     ` Wayne Whitney
@ 2001-04-23  3:21       ` Manuel McLure
  2001-04-23  5:05         ` Manuel McLure
  2001-04-23  5:17       ` Albert D. Cahalan
  2001-04-23  9:19       ` Alan Cox
  2 siblings, 1 reply; 17+ messages in thread
From: Manuel McLure @ 2001-04-23  3:21 UTC (permalink / raw)
  To: whitney; +Cc: linux-kernel


On 2001.04.22 19:42 Wayne Whitney wrote:
> In mailing-lists.linux-kernel, Manuel A. McLure wrote:
> 
> > Did you try nesting more than one "su -"? The first one after a boot
> > works for me - every other one fails.
> 
> Same here: the first "su -" works OK, but a second nested one hangs:
> 
>  8825 pts/2    S      0:00 /bin/su -
>  8826 pts/2    S      0:00 -bash
>  8854 pts/2    T      0:00 stty erase ?
>  8855 pts/0    R      0:00 ps ax
> 
> "kill -CONT 8854" has no effect.  
> 
> > I'm on RH71 - this may be specific to this release. It's also
> > kernel-dependent, I can reboot with ac5 and the problem does not
> > happen.  The kernel is compiled with the same compiler as yours.
> 
> I'm RH-7.1 and kernel 2.4.4-pre6 (with the via 3.23 driver from -ac)

It looks like this may very well be a RH 7.1 interaction with the kernel,
since others are not seeing this.

-- 
Manuel A. McLure KE6TAW | ...for in Ulthar, according to an ancient
<manuel@mclure.org>     | and significant law, no man may kill a cat.
<http://www.mclure.org> |             -- H.P. Lovecraft


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-23  3:21       ` Manuel McLure
@ 2001-04-23  5:05         ` Manuel McLure
  0 siblings, 0 replies; 17+ messages in thread
From: Manuel McLure @ 2001-04-23  5:05 UTC (permalink / raw)
  To: whitney; +Cc: linux-kernel


On 2001.04.22 20:21 Manuel McLure wrote:
> 
> On 2001.04.22 19:42 Wayne Whitney wrote:
> > In mailing-lists.linux-kernel, Manuel A. McLure wrote:
> > 
> > > Did you try nesting more than one "su -"? The first one after a boot
> > > works for me - every other one fails.
> > 
> > Same here: the first "su -" works OK, but a second nested one hangs:
> > 
> >  8825 pts/2    S      0:00 /bin/su -
> >  8826 pts/2    S      0:00 -bash
> >  8854 pts/2    T      0:00 stty erase ?
> >  8855 pts/0    R      0:00 ps ax
> > 
> > "kill -CONT 8854" has no effect.  
> > 
> > > I'm on RH71 - this may be specific to this release. It's also
> > > kernel-dependent, I can reboot with ac5 and the problem does not
> > > happen.  The kernel is compiled with the same compiler as yours.
> > 
> > I'm RH-7.1 and kernel 2.4.4-pre6 (with the via 3.23 driver from -ac)
> 
> It looks like this may very well be a RH 7.1 interaction with the kernel,
> since others are not seeing this.

Your email made me look closer at my ps output. I also have stty waiting in
"T" state.

-- 
Manuel A. McLure KE6TAW | ...for in Ulthar, according to an ancient
<manuel@mclure.org>     | and significant law, no man may kill a cat.
<http://www.mclure.org> |             -- H.P. Lovecraft


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-23  2:42     ` Wayne Whitney
  2001-04-23  3:21       ` Manuel McLure
@ 2001-04-23  5:17       ` Albert D. Cahalan
  2001-04-23  5:27         ` Wayne Whitney
  2001-04-23  9:19       ` Alan Cox
  2 siblings, 1 reply; 17+ messages in thread
From: Albert D. Cahalan @ 2001-04-23  5:17 UTC (permalink / raw)
  To: whitney; +Cc: manuel, Andrzej Krzysztofowicz, linux-kernel

Wayne writes:
> In mailing-lists.linux-kernel, Manuel A. McLure wrote:

>> Did you try nesting more than one "su -"? The first one after a boot
>> works for me - every other one fails.
>
> Same here: the first "su -" works OK, but a second nested one hangs:
>
>  8825 pts/2    S      0:00 /bin/su -
>  8826 pts/2    S      0:00 -bash
>  8854 pts/2    T      0:00 stty erase ?
>  8855 pts/0    R      0:00 ps ax

Try this:

ps -t pts/2 -o pid,ppid,pgid,sess,f,stat,ruid,euid,fname,nwchan,wchan
ps -t pts/2 s

(replace "pts/2" as needed to select the right tty, and split that
first one into two commands if it is too long)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-23  5:17       ` Albert D. Cahalan
@ 2001-04-23  5:27         ` Wayne Whitney
  0 siblings, 0 replies; 17+ messages in thread
From: Wayne Whitney @ 2001-04-23  5:27 UTC (permalink / raw)
  To: Albert D. Cahalan; +Cc: manuel, Andrzej Krzysztofowicz, LKML

On Mon, 23 Apr 2001, Albert D. Cahalan wrote:

> Try this:
>
> ps -t pts/2 -o pid,ppid,pgid,sess,f,stat,ruid,euid,fname,nwchan,wchan
> ps -t pts/2 s

OK, below are the results.  Since I'm sleepy I haven't looked up the ps
man page to see what it all means or whether I need to translate any
numbers into symbols, sorry.  Let me know if you'd like anything else.

Cheers, Wayne


[whitney@pizza whitney]$ ps auxwOT
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
[ . . . ]
root      1792  0.1  0.2  2300 1068 pts/0    S    22:19   0:00 /bin/su -
root      1796  0.2  0.2  2356 1384 pts/0    S    22:19   0:00 -bash
root      1825  0.0  0.1  2112  952 pts/0    S    22:19   0:00 /bin/su -
root      1826  0.2  0.2  2188 1148 pts/0    S    22:19   0:00 -bash
root      1854  0.0  0.0  1352  412 pts/0    T    22:19   0:00 stty erase ?
whitney   1855  0.0  0.1  2664  792 pts/2    R    22:19   0:00 ps auxwOT
[whitney@pizza whitney]$ ps -t pts/0 -o pid,ppid,pgid,sess,f,stat,ruid,euid,fname,nwchan,wchan
  PID  PPID  PGID  SESS   F STAT  RUID  EUID COMMAND   WCHAN WCHAN
 1722  1711  1722  1722 000 S      500   500 bash     117801 wait4
 1792  1722  1792  1722 000 S      500     0 su       117801 wait4
 1796  1792  1796  1722 100 S        0     0 bash     117801 wait4
 1825  1796  1825  1722 000 S        0     0 su       117801 wait4
 1826  1825  1826  1722 100 S        0     0 bash     117801 wait4
 1854  1826  1826  1722 000 T        0     0 stty     106a5f do_signal
[whitney@pizza whitney]$ ps -t pts/0 s
  UID   PID   PENDING   BLOCKED   IGNORED    CAUGHT STAT TTY        TIME COMMAND
  500  1722  00000000  00010000 <00384004  4b813efb S    pts/0      0:00 bash
    0  1792  00000000 <fffb9eff <00000000  00004000 S    pts/0      0:00 /bin/su -
    0  1796  00000000  00010000 <00384004  4b813efb S    pts/0      0:00 -bash
    0  1825  00000000 <fffb9eff <00000000  00004000 S    pts/0      0:00 /bin/su -
    0  1826  00000000  00010000 <00384004  4b813efb S    pts/0      0:00 -bash
    0  1854  00000000  00000000 <00000000  00000000 T    pts/0      0:00 stty erase ?


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-23  2:42     ` Wayne Whitney
  2001-04-23  3:21       ` Manuel McLure
  2001-04-23  5:17       ` Albert D. Cahalan
@ 2001-04-23  9:19       ` Alan Cox
  2001-04-23 15:53         ` Bill Nottingham
  2001-04-26  4:34         ` Ton Hospel
  2 siblings, 2 replies; 17+ messages in thread
From: Alan Cox @ 2001-04-23  9:19 UTC (permalink / raw)
  To: whitney; +Cc: manuel, Andrzej Krzysztofowicz, linux-kernel

> > Did you try nesting more than one "su -"? The first one after a boot
> > works for me - every other one fails.
> 
> Same here: the first "su -" works OK, but a second nested one hangs:

It appears to be a bug in PAM. Someone seems to reply on parent/child running
order and just got caught out


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-23  2:25   ` Manuel McLure
                       ` (2 preceding siblings ...)
  2001-04-23  3:01     ` John Cavan
@ 2001-04-23  9:56     ` Andrzej Krzysztofowicz
  3 siblings, 0 replies; 17+ messages in thread
From: Andrzej Krzysztofowicz @ 2001-04-23  9:56 UTC (permalink / raw)
  To: Manuel McLure; +Cc: linux-kernel

"Manuel McLure wrote:"
> On 2001.04.22 14:38 Andrzej Krzysztofowicz wrote:
> > > 
> > > I'm having a problem with "su -" on ac11/ac12. ac5 doesn't show the
> > > problem.
> > > The problem is easy to reproduce - go to a console, log in as root, do
> > an
> > > "su -" (this will succeed) and then another "su -". The second "su -"
> > > should hang - ps shows it started bash and that the bash process is
> > > sleeping. You need to "kill -9" the bash to get your prompt back.
> > 
> > No problem here.
> > 
> > P233MMX
> > 
> > # uname -a
> > Linux kufel 2.4.3-ac12 #2 nie kwi 22 15:32:51 CEST 2001 i586 unknown
> > 
> > # ls -l /lib/libc-*
> > -rwxr-xr-x   1 root     root      1060168 Nov 19 11:17 /lib/libc-2.1.3.so
> > 
> > # gcc --version
> > egcs-2.91.66
> > (kernel with the fix by Niels Kristian Bech Jensen <nkbj@image.dk>)
> > 
> > # su --version
> > su (GNU sh-utils) 2.0
> > 
> > Maybe it is RH7 specyfic ? Or you have some compiler / hardware problem ?
> > 
> > Andrzej
> 
> Did you try nesting more than one "su -"? The first one after a boot works
> for me - every other one fails.

I've tried three levels.
But my systsem is based on RH6.x

> I'm on RH71 - this may be specific to this release. It's also
> kernel-dependent, I can reboot with ac5 and the problem does not happen.
> The kernel is compiled with the same compiler as yours.
> 
> My libc is 2.2.2 while yours is 2.1.3 - this may be the difference.

Andrzej

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-23  9:19       ` Alan Cox
@ 2001-04-23 15:53         ` Bill Nottingham
  2001-04-26  4:34         ` Ton Hospel
  1 sibling, 0 replies; 17+ messages in thread
From: Bill Nottingham @ 2001-04-23 15:53 UTC (permalink / raw)
  To: Alan Cox; +Cc: whitney, manuel, Andrzej Krzysztofowicz, linux-kernel

Alan Cox (alan@lxorguk.ukuu.org.uk) said: 
> > > Did you try nesting more than one "su -"? The first one after a boot
> > > works for me - every other one fails.
> > 
> > Same here: the first "su -" works OK, but a second nested one hangs:
> 
> It appears to be a bug in PAM. Someone seems to reply on parent/child running
> order and just got caught out

I'm not so sure; this hang is already after all the authentication is
done.

Bill

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-22 17:22 Problem with "su -" and kernels 2.4.3-ac11 and higher Manuel McLure
  2001-04-22 21:38 ` Andrzej Krzysztofowicz
@ 2001-04-23 16:03 ` Lukasz Trabinski
  2001-04-23 16:13   ` Lukasz Trabinski
  1 sibling, 1 reply; 17+ messages in thread
From: Lukasz Trabinski @ 2001-04-23 16:03 UTC (permalink / raw)
  To: linux-kernel

In article <20010422102234.A1093@ulthar.internal.mclure.org> you wrote:
> I'm having a problem with "su -" on ac11/ac12. ac5 doesn't show the
> problem.
> The problem is easy to reproduce - go to a console, log in as root, do an
> "su -" (this will succeed) and then another "su -". The second "su -"
> should hang - ps shows it started bash and that the bash process is
> sleeping. You need to "kill -9" the bash to get your prompt back.

> Distribution is Red Hat 7.1, running on an Athlon Thunderbird 900MHz on a
> MSI K7T Turbo R motherboard.

I have tested it on 2.4.4pre6, here is result:

[root@lt /root]# su - test

[root@lt /root]# ps xaf
 1372 tty1     S      0:00 login -- root
 1373 tty1     S      0:00  \_ -bash
 1819 tty1     S      0:00      \_ su - test
 1820 tty1     S      0:00          \_ -bash
 1846 tty1     T      0:00              \_ stty erase ?


Last 10 lines from gdb su

Loaded symbols for /lib/security/pam_env.so
Reading symbols from /lib/security/pam_unix.so...done.
Loaded symbols for /lib/security/pam_unix.so
Reading symbols from /lib/security/pam_cracklib.so...done.
Loaded symbols for /lib/security/pam_cracklib.so
Reading symbols from /usr/lib/libcrack.so.2...done.
Loaded symbols for /usr/lib/libcrack.so.2
Reading symbols from /lib/security/pam_limits.so...done.
Loaded symbols for /lib/security/pam_limits.so
0x401156c9 in __wait4 () from /lib/libc.so.6
(gdb)

but:

[lukasz@lt lukasz]$ su -
Password:
[root@lt /root]#

It's looks OK :)


[lukasz@lt lukasz]$ su --version
su (GNU sh-utils) 2.0

[lukasz@lt lukasz]$ bash --version
GNU bash, version 2.04.21(1)-release (i386-redhat-linux-gnu)
Copyright 1999 Free Software Foundation, Inc.

[lukasz@lt lukasz]$ stty --version
stty (GNU sh-utils) 2.0


Kernel 2.4.4-pre6, 2.2.2-10, 0.74-22  - RedHat 7.1
AMD-K6 300 Mhz,


-- 
*[ Łukasz Trąbiński ]*
SysAdmin @wsisiz.edu.pl

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-23 16:03 ` Lukasz Trabinski
@ 2001-04-23 16:13   ` Lukasz Trabinski
  0 siblings, 0 replies; 17+ messages in thread
From: Lukasz Trabinski @ 2001-04-23 16:13 UTC (permalink / raw)
  To: linux-kernel

In article <200104231603.f3NG3Uo01954@lt.wsisiz.edu.pl> you wrote:


> Kernel 2.4.4-pre6, 2.2.2-10, 0.74-22  - RedHat 7.1

Little update to my last mail: glibc 2.2.2-10, PAM 0.74-22 - RedHat 7.1.


-- 
*[ Łukasz Trąbiński ]*
SysAdmin @wsisiz.edu.pl

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problem with "su -" and kernels 2.4.3-ac11 and higher
  2001-04-23  9:19       ` Alan Cox
  2001-04-23 15:53         ` Bill Nottingham
@ 2001-04-26  4:34         ` Ton Hospel
  1 sibling, 0 replies; 17+ messages in thread
From: Ton Hospel @ 2001-04-26  4:34 UTC (permalink / raw)
  To: linux-kernel

In article <E14rcVF-0007cJ-00@the-village.bc.nu>,
	Alan Cox <alan@lxorguk.ukuu.org.uk> writes:
>> > Did you try nesting more than one "su -"? The first one after a boot
>> > works for me - every other one fails.
>> 
>> Same here: the first "su -" works OK, but a second nested one hangs:
> 
> It appears to be a bug in PAM. Someone seems to reply on parent/child running
> order and just got caught out
> 

I once debugged a very simular sounding problem that I solved with
the following patch to login. It's a wild guess, but you could try if
it happens to solve it. If not it might at least be a hint of what has to
be done to su.
(the problem is that the extra process PAM keeps waiting is process leader)
(I don't have redhat, so I can't check if this is relevant here)

diff -ur util-linux-2.9x/login-utils/login.c util-linux-2.9x-ton/login-utils/login.c
--- util-linux-2.9x/login-utils/login.c	Sun Sep 12 23:25:30 1999
+++ util-linux-2.9x-ton/login-utils/login.c	Tue Sep 21 03:24:52 1999
@@ -1109,6 +1112,15 @@
        exit(0);
     }
     /* child */
+
+    if (tcsetpgrp(0, getpid()) < 0)
+        fprintf(stderr,
+                _("login: could not become foreground process group: %s\n"),
+                strerror(errno));
+    if (setpgid(0, 0) < 0)
+        fprintf(stderr, _("login: could not become process leader: %s\n"),
+                strerror(errno));
+
 #endif
     signal(SIGINT, SIG_DFL);
     

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2001-04-26  4:35 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-22 17:22 Problem with "su -" and kernels 2.4.3-ac11 and higher Manuel McLure
2001-04-22 21:38 ` Andrzej Krzysztofowicz
2001-04-23  2:25   ` Manuel McLure
2001-04-23  2:42     ` Brett
2001-04-23  3:20       ` Manuel McLure
2001-04-23  2:42     ` Wayne Whitney
2001-04-23  3:21       ` Manuel McLure
2001-04-23  5:05         ` Manuel McLure
2001-04-23  5:17       ` Albert D. Cahalan
2001-04-23  5:27         ` Wayne Whitney
2001-04-23  9:19       ` Alan Cox
2001-04-23 15:53         ` Bill Nottingham
2001-04-26  4:34         ` Ton Hospel
2001-04-23  3:01     ` John Cavan
2001-04-23  9:56     ` Andrzej Krzysztofowicz
2001-04-23 16:03 ` Lukasz Trabinski
2001-04-23 16:13   ` Lukasz Trabinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox