Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I lost my root password and can't log in, i try to use the rescue option on my red hat cd but what is the command to switch to root from the rescue option?
the rescue cd gives you root power right away... "boot access is root access"...
what you need to do is get the system to boot into "single user mode"...
you do this by editing the file "/etc/inittab" (using the rescue cd)...
there will be a line like this in there:
id:3:initdefault:
or maybe (if you're booting into X)
id:5:initdefault:
you want to change that to (from the rescue cd):
id:1:initdefault:
and then restart into your regular linux, it'll go right to a command line with full root privilages... then you should be able to assign a new password without knowing the current one, and after you do that, just edit the inittab back to the way it was (you won't need the rescue cd to do this now) and reboot...
having your bootloader set to "prompt" you is a major security risk...
BOOT ACCESS IS ROOT ACCESS...
so unless you want to give ANYBODY that uses your box the power to do ANYTHING to it, it's recommended that you disable any "boot prompts" you might be getting from your bootloader...
then you know the only way to circumvent the system is to boot the box from a cd (rescue, knoppix, or whatever)...
but of course you configured your bios (and password protected it) to ONLY boot from the hard disk...
so now the only thing a malicious user (that wants to secretly OWN your box) would have left to do is to bust-out a screwdriver to open your case and reset the jumper to clear the bios configuration and it's password so he or she can then boot the cd...
but of course by then the SWAT team would already have the whole place surrounded and illuminated with green laser beams...
=)
# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration. If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well. Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.