Bug 15688 - sulogin exits prematurely from rc.sysinit
Summary: sulogin exits prematurely from rc.sysinit
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: SysVinit
Version: 7.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
Whiteboard: Winston gold
Depends On:
TreeView+ depends on / blocked
Reported: 2000-08-07 22:36 UTC by Todd Nemanich
Modified: 2014-03-17 02:15 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2000-08-08 23:18:20 UTC

Attachments (Terms of Use)

Description Todd Nemanich 2000-08-07 22:36:05 UTC
Following a hard reboot, some of my fs's contained errors (including root
fs). fsck detected these and rc.sysinit prompts for the root password. Upon
entering the root password correctly, the machine reboots. I have seen this
error three times. sulogin never brings up a shell after the prompt. This
makes the machine virtually inaccessible.

Comment 1 Need Real Name 2000-08-08 14:30:41 UTC
I have seen this as well.  The behavior is as though you hit ^D instead of
typing in the password.
The only way to get around this is to boot with a shell for init, manually clean
the filesystems,
and reboot.

Comment 2 Glen Foster 2000-08-08 15:23:29 UTC
This defect is considered MUST-FIX for Winston Gold-release

Comment 3 Nalin Dahyabhai 2000-08-08 19:24:44 UTC
Does the root user have an unusually long entry in /etc/passwd or /etc/shadow? 
Are you using something other than a standard or MD5 password scheme?  Is root
authenticated by some mechanism other than /etc/passwd or /etc/shadow?

Comment 4 Nalin Dahyabhai 2000-08-08 19:25:35 UTC
(sulogin is in the SysVinit package)

Comment 5 Todd Nemanich 2000-08-08 19:40:41 UTC
The root password was a six character string with one non-alphanumeric
character. I am using shadowed passwords, with md5. Nothing abnormal about them.

Comment 6 Need Real Name 2000-08-08 23:07:32 UTC
OK, try this:

setup a system with /usr on a separate partition (not just / and /boot)
create a failed fsck situation (treating swap as a fs tends to work well for

when sulogin tries to run, it references /usr/bin/tput and exits right after.
it looks like since /usr isn't mounted, tput isn't found and sulogin dies
because of it.

stat("/usr/bin/tput", 0xbffff3e0)       = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
setpgid(0, 15)                          = 0
_exit(0)                                = ?

if this is right, then sulogin will fail on any system with a separate /usr
I'm going to do some experiments to confirm this.

Comment 7 Need Real Name 2000-08-08 23:18:18 UTC
OK,  I just confirmed this, after copying /usr/bin/tput and
off the /usr/ partiton, and onto the root partition in /usr sulogin worked as

It looks like the culprit is this from /etc/bashrc:

# Don't do anything if /usr is not mounted (i.e. /usr is a separate
# partition and we're run by fsck)
[ ! -x /usr/bin/tput ] && exit 0

sulogin spawns bash which dutifully exits and restarts the system.

Comment 8 Bill Nottingham 2000-08-08 23:26:33 UTC
bashrc is being very dumb. Fixed in 2.04-10.

Note You need to log in before you can comment on or make changes to this bug.