[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Passwords



Le 17-01-2023, à 07:19:04 -0500, Greg Wooledge a écrit :

On Tue, Jan 17, 2023 at 09:36:03AM +0100, steve wrote:
Easier would be to delete the second field in /etc/shadow for root, so there
won't be anymore root password (it's empty). You can then create one with the
'passwd' command.

If you can edit the /etc/shadow file, you're already root, which means
you can simply run "passwd root" to set a new password.  You will not
be prompted for the old password, so there's no need to clear the old
password hash preemptively.

You're right if you're editing the file in the OS, but not if you have
accessed data from a live-cd, which was what I was thinking. Sorry.


Reply to: