-   Slackware (
-   -   resetting root password of encrypted hard drive (

drink76cup 05-21-2013 06:38 AM

resetting root password of encrypted hard drive

I have an encrypted slackware root partition, but I've forgotten the password.

How can I reset the root password?

I have used the slackware installation dvd, and login to the disk, but when I try to mount the partition I get an error:

'mount: unknown filesystem type 'crypto_LUKS'

ponce 05-21-2013 06:52 AM

if you encrypt something and you forgot the password then you can't recover it: if it won't be like this, anybody can circumvent your encryption on volumes and have access to them.

drink76cup 05-21-2013 07:18 AM

I have the encryption password, just not the root password to log-in to slackware.

I dont know how to mount the encrypted partition, to get in to change the root password.

ponce 05-21-2013 07:52 AM

you have to use cryptsetup: assuming your root partition is /dev/sda1

cryptsetup luksOpen /dev/sda1 unencrypted
then you'll have your device (to mount, chroot and passwd) in /dev/mapper/unencrypted

drink76cup 05-21-2013 08:22 AM

Ponce, I have mounted the encrypted partition, please can you give me instruction how to chroot into the system.

ponce 05-21-2013 08:30 AM

to simply change the password is really easy:

chroot /where/you/mounted/it


drink76cup 05-21-2013 08:34 AM


I get:

chroot: cant execute '/bin/sh': No such file or directory

ponce 05-21-2013 08:46 AM

I think either the folder you are tryng to chroot into doesn't contain your root partition or you have installed slackware64 and booted a 32bit install dvd.

drink76cup 05-21-2013 08:47 AM

Dont I need to mount the /bin directory, or something?

ponce 05-21-2013 08:50 AM

only you know how you have partitioned your installation, normally /bin is not on its own partition (it doesn't make much sense).

ljb643 05-21-2013 08:32 PM

Just mount the encrypted volume, edit mount-point/etc/shadow and delete the 2nd field - between the ':' markers - on the line for 'root'. Won't that work? Boot up, login root with no password, and then use passwd to set a new one. No?

All times are GMT -5. The time now is 02:59 AM.