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 have to use MDK cd1,"F1" then type "rescue",then "go to console".After that I type "vi /etc/inittab".Changing to id:1: (used id:3) .Checked runnning vi again-changed succecsfuly.
So know it is changed to runlevel 1. I do ctr+alt+del and Lilo shows up.But then boots Mandrake 9.2 normaly,as before.Login as user and looking to /etc/inittab. Problem is that it is in runlevel 3 again.
> 1. Boot the Mandrake Installation CD.
> 2. Press F1 key at the installation splash screen
> 3. At the "boot:" prompt type "rescue". This will boot the "rescue"
> mini-system.
> 4. When the rescue menu comes up, choose "mount your partitions under
> /mnt". Let this execute and you will come back to the rescue menu.
> 5. Choose "Go to console" from the rescue menu.
>
> # cd /mnt/etc
> # vi passwd
>
> Edit the "passwd" and remove the "x" from the root entry line:
> Change:
>
> root:x:root:0:0:/root:/bin/bash
>
> To:
>
> root::root:0:0:/root:/bin/bash
>
> (In vi, the "x" keystroke deletes a character.) Then use ":wq" to
> save the passwd file.
>
> # reboot
>
> 6. Remove the CD as you reboot.
>
> Now you don't have a password for root......... Be sure the set a
> password when you are able to reboot.
Sounds to me like the file you are editing, /etc/inittab, is relative to the tmpfs filesystem that is loaded into ram from your boot cd. the reason it is not saving is because its not writing to the hard disk, but to the RAM, which is flushed on reboot. try this once booted in a console again:
mkdir /tempfix
mount /dev/hda2 /tempfix
cd /tempfix
vi etc/inittab
edit, save, reboot
please note that you must change /dev/hda2 to point to the actual partition with your root file system.
Wow, the solutions thus far seem a lot more complicated than how I'd handle it. You should be able to simply pass an option to your boot loader to boot into single-user mode. If you're using SuSE then this wouldn't be possible, since SuSE asks for your root password to enter single-user mode (more hassle than neccessary imho). If you're using LILO (should be default in Mandrake), then you simply press ESC to get to the text-based screen (versus the graphical selecter) and type "linux 1". For GRUB you press "e" to edit the boot options and append the middle line with "single" (or a number might work as well).
Once you're booted into single-user mode you can then run "passwd" to change your root password :-).
Originally posted by tk31337 Wow, the solutions thus far seem a lot more complicated than how I'd handle it. You should be able to simply pass an option to your boot loader to boot into single-user mode. If you're using SuSE then this wouldn't be possible, since SuSE asks for your root password to enter single-user mode (more hassle than neccessary imho). If you're using LILO (should be default in Mandrake), then you simply press ESC to get to the text-based screen (versus the graphical selecter) and type "linux 1". For GRUB you press "e" to edit the boot options and append the middle line with "single" (or a number might work as well).
Once you're booted into single-user mode you can then run "passwd" to change your root password :-).
I tried your recommendation and it works awsome!Using Lilo. thanks a lot.It works perfect.Great!!!!!
Originally posted by Axion Sounds to me like the file you are editing, /etc/inittab, is relative to the tmpfs filesystem that is loaded into ram from your boot cd. the reason it is not saving is because its not writing to the hard disk, but to the RAM, which is flushed on reboot. try this once booted in a console again:
mkdir /tempfix
mount /dev/hda2 /tempfix
cd /tempfix
vi etc/inittab
edit, save, reboot
please note that you must change /dev/hda2 to point to the actual partition with your root file system.
Thanx for replying.But I tried what guy after you replied and it works.Yours probalby works too.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.