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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. CentOS / RHEL 6 : How to force a NTP sync with the NTP server(s)
  2. brightnessctl: command not found
  3. How to Boot into Rescue Mode or Emergency Mode Through Systemd in CentOS/RHEL 7 and 8
  4. i3status: command not found
  5. pngcrush for image optimization
  6. caja: command not found
  7. How to create partitions and file systems on DM-Multipath devices
  8. ssh-keygen: command not found
  9. Installation Steps of jEdit on Ubuntu Linux
  10. ss: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright