Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 15688 - sulogin exits prematurely from rc.sysinit
sulogin exits prematurely from rc.sysinit
Product: Red Hat Linux
Classification: Retired
Component: SysVinit (Show other bugs)
i386 Linux
high Severity high
: ---
: ---
Assigned To: Bill Nottingham
Winston gold
Depends On:
  Show dependency treegraph
Reported: 2000-08-07 18:36 EDT by Todd Nemanich
Modified: 2014-03-16 22:15 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-08-08 19:18:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Todd Nemanich 2000-08-07 18:36:05 EDT
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 10:30:41 EDT
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 11:23:29 EDT
This defect is considered MUST-FIX for Winston Gold-release
Comment 3 Nalin Dahyabhai 2000-08-08 15:24:44 EDT
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 15:25:35 EDT
(sulogin is in the SysVinit package)
Comment 5 Todd Nemanich 2000-08-08 15:40:41 EDT
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 19:07:32 EDT
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 19:18:18 EDT
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 19:26:33 EDT
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.