Re: [opensuse] opensuse 15.2 lost password
On Tue, 2020-09-15 at 22:16 -0400, Anton Aylward wrote:
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.
So now I must clear both /etc/passwd and /etc/shadow? CWSIV ____________________________________________________________ Sponsored by https://www.newser.com/?utm_source=part&utm_medium=uol&utm_campaign=rss_taglines_more Party Seriously Messes Things Up for One High School http://thirdpartyoffers.juno.com/TGL3131/5f6a97cd31d8c17cc4239st02vuc1 She Claimed Politician Was a Pedophile, Now Owes $625K http://thirdpartyoffers.juno.com/TGL3131/5f6a97cd555f017cc4239st02vuc2 Bloomberg Helps Cover Fines So Florida Felons Can Vote http://thirdpartyoffers.juno.com/TGL3131/5f6a97cd792e317cc4239st02vuc3 -- 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-22 17:33 (UTC-0700):
On Tue, 2020-09-15 at 22:16 -0400, Anton Aylward wrote: ...
Like the old system, you can blank out the password field to remove it.
So now I must clear both /etc/passwd and /etc/shadow? If you use any of the methods David (/bin/bash...) or I suggested (chroot...; <https://en.opensuse.org/SDB:Recover_root_password>), or that Per and Carlos confirmed, in this very thread, the passwd command does all the work. There should be no need to edit either of those two files directly. -- 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
Felix Miata wrote:
Carl Spitzer {L Juno} composed on 2020-09-22 17:33 (UTC-0700):
On Tue, 2020-09-15 at 22:16 -0400, Anton Aylward wrote: ...
Like the old system, you can blank out the password field to remove it.
So now I must clear both /etc/passwd and /etc/shadow?
If you use any of the methods David (/bin/bash...) or I suggested (chroot...; <https://en.opensuse.org/SDB:Recover_root_password>), or that Per and Carlos confirmed, in this very thread, the passwd command does all the work. There should be no need to edit either of those two files directly.
I can only second that. It is really very easily done. -- Per Jessen, Zürich (19.9°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
participants (3)
-
Carl Spitzer {L Juno}
-
Felix Miata
-
Per Jessen