On 12/06/2022 16.55, NummeShkassatUCazzz wrote:
> It's been a long time since I last used a Devuan distro on one laptop.
> Yesterday I had to face the fact that I'm unable to remember either the
> username or the password or both (more likely the pwd but unsure).
> Is it there some way to recover the install ?
> I don't have "unique" data there, but I have a lot of stuff installed,
> and reconfigure from scratch would be really annoying.
As long as it's not an encrypted driver and you forgot the decrypt
keyword, then you can always boot into single user mode.
1. At Grub boot selector press 'e' key
2. Go to the row starting with "linux" and type '1' without the single
quotes at the end of that line
3. Press the 'F10' key
After a while you should end up in a primitive dash prompt where you can
run passwd to change password.
Change current user (root in this case):
Change another user:
If you are unsure about the user name, you can look in /etc/passed,
usually this is the same as the users home directory, so a "ls /home"
can be enough too.
If you prompt want to use the Install DVD media, you boot it up as
normally and then
1. mount the system disk
2. chroot into the directory to where the system disk was mounted
3. run passwd in the same manner as above.
The first method has the drawback that grub may be password protected,
but normally people do not password protect grub, so you don't have to
enter a password when you press 'e'.
The second one may need that you bind mount /dev /sys and /proc to the
mounted directory for the system disk, but that depends on the command
you need to run. The bind mount needs to be unmounted before you can
unmount the system disk.