On 08/23/2012 03:18 PM, Pat Riehecky wrote:
On 08/18/2012 03:57 PM, David Sommerseth wrote:
Hi,

I've been running Scientific Linux since the 6.0 days, and single-user mode
have basically behaved how I have expected it those few times I needed it.
As I usually set up my boxes root accounts with passwords disabled,
single-user mode needs to be without root password.

Today, after having upgraded from 6.3, I needed to enter single-user mode at
boot. And I was asked for a password at boot time. Is this change intentional?

# cat /etc/redhat-release
Scientific Linux release 6.3 (Carbon)
# rpm -qa | grep -i sl_password_for_singleuser | wc -l
0
# grep SINGLE /etc/sysconfig/init
SINGLE=/sbin/sushell

If this change was intentional, how can I go back to the old behaviour? I
double checked the behaviour with an old VM with SL6.1, and that behaves as
expected.


kind regards,

David Sommerseth

Hi David,

The behavior shouldn't have changed. You've provided just about all the
relevant details in your email, so there isn't really anything I want to ask
for more information.

Can I have you try setting /etc/sysconfig/init => SINGLE to /sbin/sulogin
rebooting and setting it back to /sbin/sushell? Perhaps something got 'stuck'
wrong....

/sbin/sushell is a shell script, so can I have you verify its contents? Mine
looks like:

#!/bin/bash

[ -z "$SUSHELL" ] && SUSHELL=/bin/bash

exec $SUSHELL

Hi Pat,

First of all, tanks a lot for your answer, and to Stephan for his input as well. I checked /sbin/sushell and the SINGLE variable in /etc/sysconfig/init. And it was currently working just as expected - in both modes.

But as I knew it had been failing, I added an extra disk to the VM I have with SL6.3. Double checked adding 's' to the kernel command line gave me a shell without asking for password. Then I added this disk to /etc/fstab ... and removed the extra disk. This time, I was asked for a root password when booting up - both when I was asking for 's'ingle user-mode and without it. Adding the disk back, and the "proper" behaviour is back too.

So that's the issue I hit, as I in my real setup had just added and configured a new disk with encryption on my VM - but messed up the encryption key. When I then wanted to rescue the system, instead of solving it via 'single-user mode' I had to use guestfish on the root filesystem of the failing machine and disable the new disk in /etc/cryptotab and /etc/fstab. Then I could start setting up the disk again with a proper key.

But the hint from Stephan, setting EMERGENCY=/sbin/sushell in /etc/sysconfig/init did the trick. So that's what I need to set on all my boxes.

Lesson learnt: Emergency mode supersedes single-user mode, especially with filesystem failures.


Thanks all!


kind regards,

David Sommerseth

Reply via email to