TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: DENNIS LEE BIEBER
date: 2019-02-07 14:38:00
subject: Re: Recover password

On Thu, 7 Feb 2019 13:47:46 +0000, Chris Elvidge 
declaimed the following:


>
>ssh into it. Are you root? No?
>sudo su -
>You're now root!
>passwd
>to reset the root password

 NOTE: for security, it is considered better not to have a root password
at all, requiring one to log in as a regular user and rely upon sudo to
gain root privileges temporarily.

 The RPi is a bit lax in that it also doesn't require the user password
in order to access sudo (BeagleBone configuration requires knowing the user
password -- which prevents passers-by from doing stuff to an unlocked SSH
session )

>passwd username
>to reset the password for username


 FOR THE OP: one can never "recover" a password in Linux. Passwords are
(or were, last time I checked) passed through a one-way hash function with
a randomly selected "salt" (the salt is used as a prefix to the stored
value, so logging in can use the same salt with the user provided password,
which then generates the same hash code if valid). The best one can do, if
one has access to the passwd file (or, in more secure configurations, the
shadow passwd file) is read the hash value, then attempt to create a
password that generates the same hash value when using the same "salt".


--
 Wulfraed                 Dennis Lee Bieber         AF6VN
 wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.