9
Oct

Tight up single-user login mode

   Posted by: Vivek Khokhar   in Linux

Linux has a special command (linux single) also known as ‘single-user mode’, which can be
entered at the boot prompt during startup of the system. The single-user mode is generally used
for system maintenance. You can boot Linux in single-user mode by typing at the LILO boot
prompt the following command:
LILO: linux single

This will place the system in Run level 1 where you’ll be logged in as the super-user ‘root’, and
where you won’t even have to type in a password! Requiring no password to boot into root under single-user mode is a bad idea! You can fix this by
 Editing the inittab file (vi /etc/inittab) and change the following line:
id:3:initdefault:
To read:
id:3:initdefault:
~~:S:wait:/sbin/sulogin
The addition of the above line will require to enter the root password before continuing to boot
into single-user mode by making init (8) run the program sulogin (8) before dropping
the machine into a root shell for maintenance.

 Now, for the change to take effect type in the following at a prompt:
# /sbin/init q

This entry was posted on Monday, October 9th, 2006 at 3:17 am and is filed under Linux. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

You must be logged in to post a comment.