View previous topic :: View next topic |
Author |
Message |
geeshock Moderator
Joined: 02 Nov 2024 Posts: 1017 Location: Hertford, NC
|
|
Back to top |
|
lynch Moderator
Joined: 15 Nov 2024 Posts: 2659 Location: The Diamond State
|
|
Back to top |
|
mushroom Ultimate Member
Joined: 29 Jun 2024 Posts: 2129 Location: Queen Charlotte B. C. Canada
|
Posted: Wed Jun 15, 2024 4:40 am Post subject: |
|
|
I had friend who set up a couple of other friends with SuSE and did not tell them the root password so they could not mess it up.
He died a year and a half ago.
Now one of them needs configuration changes within a week or he will have no internet.
Glad this tread was here, even if it did not work on SuSE (tested on 9.3), went to few other forums and tried their solutions none of which worked
After 8-10 hrs of searching and testing and almost ready to give up had an idea
Why worry about blanking the password and putting in a new one, just replace it with one I know
1. Go to a working SuSE box that I know the root password of, open "/etc/shadow" and copy the complete line that starts with "root:" to a text file and save it to a floppy.
2. Go to the "lost root password" box with a live CD (I used Mepis) and boot from the live from the CD.
3. Login as root, mount the hard drive and the floppy
4. Open the text file in a text editor and copy the line to the clipboard
5. Open "/etc/shadow" in a text editor and replace the "root:" line with the one in the clipboard, save it and your done.
Tested the same string on 8.2, 9.2, and 9.3, all worked
_________________ SuSE 8.0, 8.2, 9.0, 9.1, 9.2, 9.3, 10.0, 10.1, 10.2, 10.3, 11.0, 11.1
Live CDs Mepis 8.0, Puppy 4.3.1, netbook- Zenwalk 6.2
|
|
Back to top |
|
jbsnake Moderator
Joined: 02 Dec 2024 Posts: 1726 Location: Georgia
|
|
Back to top |
|
jbsnake Moderator
Joined: 02 Dec 2024 Posts: 1726 Location: Georgia
|
|
Back to top |
|
nukes Linux Guru
Joined: 29 Aug 2024 Posts: 4558
|
Posted: Thu Jun 16, 2024 6:13 pm Post subject: |
|
|
Some systems will still prompt for a password in single-user mode. You can circumvent this by passing
to the kernel command line, then mounting everything and changing the password.
_________________ Gentoo x86-64 2.6.29.1
FreeBSD 7-CURRENT
Arch x86 2.6.30
|
|
Back to top |
|
Merlin615 Member
Joined: 17 Sep 2024 Posts: 149 Location: Elk Mound, WI
|
|
Back to top |
|
JP Linux Guru
Joined: 07 Jul 2024 Posts: 6670 Location: Central Montana
|
Posted: Sun Nov 13, 2024 10:38 pm Post subject: |
|
|
Crouse, I didn't have a choice for single user mode in this RedHat 8.0, so I tried to recover the passwlrd your way. These are the results: Code: | knoppix@ttyp0[knoppix]$ /mnt/hda2
bash: /mnt/hda2: is a directory
knoppix@ttyp0[knoppix]$ chroot /mnt/hda2
chroot: cannot change root directory to /mnt/hda2: Operation not permitted
knoppix@ttyp0[knoppix]$ passwd
Changing password for knoppix
(current) UNIX password:
|
Code: | knoppix@ttyp0[knoppix]$ su
root@ttyp0[knoppix]# /mnt/hda2
bash: /mnt/hda2: is a directory
root@ttyp0[knoppix]# chroot /mnt/hda2
chroot: /bin/bash: No such file or directory
root@ttyp0[knoppix]# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@ttyp0[knoppix]#
|
Niether of these works!
This is the hard drive out of Paul's computer and I am trying to get into the RedHat without damaging the Windoze (where he did a lot of his Poser/Bryce/Carrerra/Macromedia Flash stuff.
_________________ Dell Box - Arch Linux
Dell Lappy - DreamLinux 3.5 - Default OS
Mepis 8.0 - Backup
|
|
Back to top |
|
Germ Keeper of the BIG STICK
Joined: 30 Apr 2024 Posts: 12452 Location: Planet Earth
|
|
Back to top |
|
JP Linux Guru
Joined: 07 Jul 2024 Posts: 6670 Location: Central Montana
|
|
Back to top |
|
Cope57 Sr. Member
Joined: 25 Jan 2024 Posts: 1602 Location: 34.638673, -98.384704
|
Posted: Mon Nov 14, 2024 4:02 am Post subject: |
|
|
Merlin615 wrote: | I wonder why it lost all the passwords in the first place.... |
Possible motherboard CMOS battery went dead?_________________ This block is for DISTRO information ONLY, all other information will be removed by the Site Administrators.
Debian GNU/Linux testing - Linux 2.6.32-4-amd64 |
|
Back to top |
|
Germ Keeper of the BIG STICK
Joined: 30 Apr 2024 Posts: 12452 Location: Planet Earth
|
|
Back to top |
|
flashingcurser Member
Joined: 13 Sep 2024 Posts: 134 Location: Montana
|
Posted: Tue Dec 13, 2024 11:01 pm Post subject: |
|
|
Variant of the same walk through--
Boot with a slackware install cd (from 8.0 to 10.2 will do)-- it takes you directly to a command line. (Just dont type in "setup" and most of the time the stock kernel works)
mkdir /whatever
mount /dev/hda /whatever (most of the time you dont have to put "-t fstype")
chroot /whatever
/usr/sbin/passwd root
dan
_________________ True64, Slack, OpenVMS, Debian, etc..
|
|
Back to top |
|
JP Linux Guru
Joined: 07 Jul 2024 Posts: 6670 Location: Central Montana
|
Posted: Wed Dec 14, 2024 6:41 am Post subject: |
|
|
Just thought I'd add this which I found on the Libranet forum:
Lunarglow wrote: | The following belongs in every Linux user's bag of tricks. Basicallly, if you can physically get to the computer, you can reset the root password, UNLESS the BIOS has been password protected, or unless the boot manager has been passward protected.
If you're using Libranet, let the computer boot to the GRUB menu. Then, press e (for edit) before Linux has a chance to boot.
Now, cursor down a line, and press e (for edit) again, you should now be on the kernel line, and press End to go out to the very end of that line. Now add the folllowing:
or you could enter,
All you're doing is, telling Linux to boot to a console shell instead of running all the startup programs, which are defined in /etc/init.d
Now, press Enter, and you're back at the kernel line, press b (for boot) and the computer will proceed to boot to a prompt.
At this point, the root file system is still mounted read-only, so enter the following command:
Code: |
mount -n -o remount,rw / |
The above is not magic, all it is, the -n tells the command Not to add the setting to /etc/mtab (which, at the moment, it CAN'T, because it's still read-only), and the -o says, here comes some Options, which are remount,rw (re-mount as read-write) the / (root file system).
Now you're IN !!!
Other tutorials give more complicated instructions, but all you really have to do now is,
and proceed to create the new password.
After this, just go
And you're done. When the O.S. boots up, you can log in as root using the new password. |
And then this, just in case *crosses fingers*
cyphedude wrote: | lunarglow wrote: |
...UNLESS the BIOS has been password protected... |
Actually, most (if not all) motherboards have a jumper that can reset the BIOS settings back to default, which erases the password. A BIOS password is useless unless you physically block access to the motherboard. |
I think it's pretty newbie friendly in it's explanation
_________________ Dell Box - Arch Linux
Dell Lappy - DreamLinux 3.5 - Default OS
Mepis 8.0 - Backup
|
|
Back to top |
|
jbsnake Moderator
Joined: 02 Dec 2024 Posts: 1726 Location: Georgia
|
|
Back to top |
|
|