Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You mean booting to singleuser? If you don't want it just use a grub password; nothing to do with CentOS.


Is the procedure for changing the root password with grub the same regardless of the flavour of Linux?


The primary bootloaders for Linux distributions are http://en.wikipedia.org/wiki/GNU_GRUB and http://en.wikipedia.org/wiki/LILO_(boot_loader) with a large edge in popularity to GRUB these days. Unless it's a fork or modification, GRUB works like this: http://www.gnu.org/software/grub/manual

Single User Mode isn't unique to CentOS/Redhat, or even Linux. In fact, the concept behind it isn't even unique to Unix: One of Microsoft's 10 security rules is "if the bad guy has unrestricted physical access to your box, it isn't your box anymore."

edit for clarity, due to reply

GRUB doesn't change the Unix root password. GRUB--like any other bootloader--lets you boot to single user mode, which doesn't require a password. Single user mode lets you change the Unix root password.


I'm aware of GRUB and LILO. But as bootloaders, I didn't realize they were able to modify the Linux root password so easily. The question still stands: is it possible in any flavour of Linux to change the root password by modifying the kernel parameters at boot-time?


On any flavor of linux that uses GRUB or LILO it's possible to modify the kernel parameters at boot time to enter single-user mode. Once you're in single-user mode you have full root privileges and environment and can change any passwords or files you like.


Ah, okay. Thanks for explaining that. I didn't realize it was possible to get into single user mode without the password for any Linux.

Is the same true for BSDs, Solaris, et al?





Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: