On Fri, Nov 22, 2024 at 9:27 AM The David <thedavi...@hotmail.com> wrote:
> We have been using the debian 3.2.0-4-686-pae for our company. We are moving 
> to another state and we forgot the password. Is there anyway to recover this 
> without losing data? Thank you.

Yikes!  That kernel goes back to Debian 7 - released 2013-05-04
https://lists.debian.org/debian-announce/2013/msg00002.html
EOL 2016-04-25, EOL LTS 2018-05-31, EOL ELTS ~2020-06-30
https://wiki.debian.org/DebianReleases

And no, you can't recover password(s), but you can reset.
If it's password of non-root user, reset it via root account, e.g.:
# passwd name_of_user_login_to_reset
If it's root password, can boot to single user mode or maintenance
mode or the like,
for Debian 7, default init was still sysv, so can boot to single user
mode by passing additional kernel parameter of S (or s)
if that doesn't prompt you for password, should be good at that point,
mount the filesystems, e.g.:
# mount -a
Make sure root (/) filesystem is mounted rw, if it's still mounted ro,
then to remount it rw:
# mount -o remount,rw /
And then change the root password:
# passwd
If that boot to single user mode insists upon root password,
or if you're using systemd init system, can instead of parameter of S
(or s) at boot,
pass additional parameter of:
init=/bin/sh
That will get you root shell without needing to enter password.
You'll then need to mount the relevant filesystem(s), and rw as applicable,
chroot into such, and then likewise reset password with the passwd
command run as root.
If you're being kept out by a GRUB password you don't know,
can boot off ISO or network, e.g. recovery or install environment,
and use that similar to the above to mount and access the target filesystem(s),
generally use chroot to get into them, and then as root the passwd
command to reset password(s).

If the password you lost is for LUKS encryption, you're screwed -
restore from backup(s).  Only possible exception on that
might be if the host is still up and running and hasn't been rebooted
and you have access to root shell,
or if the password happens to be so weak you can find it via brute
force attempts at it.

Reply via email to