[opensuse] opensuse 15.2 lost password
I have gone and dome something dumb and lost the paper with the root password. In the old days a Knoppix disk could be used to boot a system and remove the password indicator. Thus clearing the root password and allowing a new one to be set. Is this still true? /etc/passwd root:x:0:0:root:/root:/bin/bash [--] - [--] [--] [-----] [--------] [--------] | | | | | | | | | | | | | +-> 7. Login shell | | | | | +----------> 6. Home directory | | | | +--------------------> 5. GECOS | | | +--------------------------> 4. GID | | +-------------------------------> 3. UID | +-----------------------------------> 2. Password +----------------------------------------> 1. Username Password. In older Linux systems, the user’s encrypted password was stored in the /etc/passwd file. On most modern systems, this field is set to x, and the user password is stored in the /etc/shadow file. From https://linuxize.com/post/etc-passwd-file/ ____________________________________________________________ Sponsored by https://www.newser.com/?utm_source=part&utm_medium=uol&utm_campaign=rss_taglines_more Breonna Taylor Settlement Is a Record-Breaker http://thirdpartyoffers.juno.com/TGL3131/5f616ba13cbb46ba06f51st02duc1 Hurricane Sally Moving Slowly, and That's Bad http://thirdpartyoffers.juno.com/TGL3131/5f616ba15ce826ba06f51st02duc2 175-Year-Old Magazine Endorses Candidate for First Time http://thirdpartyoffers.juno.com/TGL3131/5f616ba17bb896ba06f51st02duc3 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 15/09/2020 21:33, Carl Spitzer {L Juno} wrote:
I have gone and dome something dumb and lost the paper with the root password. In the old days a Knoppix disk could be used to boot a system and remove the password indicator. Thus clearing the root password and allowing a new one to be set.
Is this still true?
/etc/passwd root:x:0:0:root:/root:/bin/bash [--] - [--] [--] [-----] [--------] [--------] | | | | | | | | | | | | | +-> 7. Login shell | | | | | +----------> 6. Home directory | | | | +--------------------> 5. GECOS | | | +--------------------------> 4. GID | | +-------------------------------> 3. UID | +-----------------------------------> 2. Password +----------------------------------------> 1. Username Password. In older Linux systems, the user’s encrypted password was stored in the /etc/passwd file. On most modern systems, this field is set to x, and the user password is stored in the /etc/shadow file.
See PASSWD(5) for the above. Then SHADOW(5) The shadow file has 9 fields. again separated by colons Like the above, the first is the username. The second is the encrypted password. You can ignore the rest, they are to do with date/change and expiry. Like the old system, you can blank out the password field to remove it. You you can boot with knoppix but make sure you _can_ mount your openSuse root file system. Some versions of knoppix don't like openSuse version of BtrFS. This is why I use the 'rescue cd' instead. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Carl Spitzer {L Juno} composed on 2020-09-15 18:33 (UTC-0700):
I have gone and dome something dumb and lost the paper with the root password. In the old days a Knoppix disk could be used to boot a system and remove the password indicator. Thus clearing the root password and allowing a new one to be set Is this still true?
I don't recall ever trying that method. I boot any live Linux media that knows how to mount the / filesystem, mount it, chroot to it, and execute the passwd command. -- Evolution as taught in public schools, like religion, is based on faith, not on science. Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 16/09/2020 00:17, Felix Miata wrote:
Carl Spitzer {L Juno} composed on 2020-09-15 18:33 (UTC-0700):
I have gone and dome something dumb and lost the paper with the root password. In the old days a Knoppix disk could be used to boot a system and remove the password indicator. Thus clearing the root password and allowing a new one to be set Is this still true?
I don't recall ever trying that method. I boot any live Linux media that knows how to mount the / filesystem, mount it, chroot to it, and execute the passwd command.
Well, yes, that too, and I do too 'cos I have the rescue CD. But Carl talked of booting Knoppix and editing the root /etc/ files on the openSUSE root partition. Yes, it seemed archaic to me, and I've found the recent Knoppix a bit confusing, but it always booted on any hardware, even ones that openSUSE, Redhat and Ubunto wouldn't, which was rare! And it works with old 32-bit hardware. So I can see why some people believe in it. Also all the things needed to actually make the pivot you describe work successfully, the extra mounts beforehand, seem to baffle some people. -- “Reality is so complex, we must move away from dogma, whether it’s conspiracy theories or free-market,” -- James Glattfelder. http://jth.ch/jbg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Felix Miata wrote:
Carl Spitzer {L Juno} composed on 2020-09-15 18:33 (UTC-0700):
I have gone and dome something dumb and lost the paper with the root password. In the old days a Knoppix disk could be used to boot a system and remove the password indicator. Thus clearing the root password and allowing a new one to be set Is this still true?
I don't recall ever trying that method. I boot any live Linux media that knows how to mount the / filesystem, mount it, chroot to it, and execute the passwd command.
Ditto and ditto. -- Per Jessen, Zürich (26.4°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 16/09/2020 06.17, Felix Miata wrote:
Carl Spitzer {L Juno} composed on 2020-09-15 18:33 (UTC-0700):
I have gone and dome something dumb and lost the paper with the root password. In the old days a Knoppix disk could be used to boot a system and remove the password indicator. Thus clearing the root password and allowing a new one to be set Is this still true?
I don't recall ever trying that method. I boot any live Linux media that knows how to mount the / filesystem, mount it, chroot to it, and execute the passwd command.
I have done similar. Edit a rescue system (could be the openSUSE install media), mount the root filesystem, edit the password or the shadow file directly. Yes, sure. The bash trick I don't usually remember, and in those emergencies I did not have another computer to look on Internet. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)
On 9/15/20 8:33 PM, Carl Spitzer {L Juno} wrote:
In the old days a Knoppix disk could be used to boot a system and remove the password indicator. Thus clearing the root password and allowing a new one to be set.
Old ways should still work, Boot system: (1) at grub prompt, select "Edit" and add init=/bin/bash at the end of the kernel line; (2) continue boot (3) make sure / is mounted read-write, if not mounted or if mounted readonly # mount -o,rw /dev/your_root / or to remount from ro: # mount -o remount,rw / (4) passwd change password and reboot. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (6)
-
Anton Aylward
-
Carl Spitzer {L Juno}
-
Carlos E. R.
-
David C. Rankin
-
Felix Miata
-
Per Jessen