• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL 6 : How to password-protect single user mode

by admin

Locking down single-user mode in RHEL6 requires editing /boot/grub/grub.conf and /etc/sysconfig/init.

1. Change the definition of the single user login shell in /etc/sysconfig/init from sushell to sulogin

# vi /etc/sysconfig/init
...
# Set to '/sbin/sulogin' to prompt for password on single-user mode
# Set to '/sbin/sushell' otherwise
SINGLE=/sbin/sulogin       <--- changed from sushell to sulogin
...

2. You can also use sed to directly change the required line :

# sed -i "s,^SINGLE=.*,SINGLE=/sbin/sulogin," /etc/sysconfig/init

3. Doing the above results in single-user mode showing the same login prompt normally seen in emergency (maintenance) mode as shown below :

RHEL 6 password protect single user mode

Filed Under: Linux

Some more articles you might also be interested in …

  1. mimetype Command Examples in Linux
  2. sinfo: command not found
  3. faillock: command not found
  4. asterisk: command not found
  5. aptitude Command Examples in Linux
  6. “docker stats” Command Examples
  7. hwclock: command not found
  8. kvm-img: command not found
  9. “aws s3 presign” Command Examples
  10. blender Command Examples (Command-line interface to the Blender 3D computer graphics application)

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright