• 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 5 : How to password-protect single user mode

by admin

Locking down single-user mode in RHEL5 requires editing /boot/grub/grub.conf and /etc/inittab files.

1. Define the single user login shell in /etc/inittab by adding a the below line :

# vi /etc/inittab
...
su:S:wait:/sbin/sulogin

Or you can also use output redirection to have the entry placed in the file /etc/inittab :

# echo "su:S:wait:/sbin/sulogin" >>/etc/inittab

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

RHEL 5 password protect single user mode

Filed Under: Linux

Some more articles you might also be interested in …

  1. arecord: command not found
  2. dnstracer: command not found
  3. finger: User information lookup program
  4. subscription-manager: command not found
  5. lslocks: command not found
  6. qemu does not launch : vnc server started
  7. perf Command Examples in Linux
  8. aspell Command Examples in Linux
  9. Understanding the /etc/fstab file in Linux
  10. screenkey Command Examples in Linux

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