LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-21-2013, 05:38 AM   #1
drink76cup
LQ Newbie
 
Registered: May 2013
Posts: 10

Rep: Reputation: Disabled
resetting root password of encrypted hard drive


Hello,

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'
 
Old 05-21-2013, 05:52 AM   #2
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,460

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
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.
 
Old 05-21-2013, 06:18 AM   #3
drink76cup
LQ Newbie
 
Registered: May 2013
Posts: 10

Original Poster
Rep: Reputation: Disabled
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.

Last edited by drink76cup; 05-21-2013 at 06:23 AM.
 
Old 05-21-2013, 06:52 AM   #4
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,460

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
you have to use cryptsetup: assuming your root partition is /dev/sda1
Code:
cryptsetup luksOpen /dev/sda1 unencrypted
then you'll have your device (to mount, chroot and passwd) in /dev/mapper/unencrypted
 
Old 05-21-2013, 07:22 AM   #5
drink76cup
LQ Newbie
 
Registered: May 2013
Posts: 10

Original Poster
Rep: Reputation: Disabled
Ponce, I have mounted the encrypted partition, please can you give me instruction how to chroot into the system.
 
Old 05-21-2013, 07:30 AM   #6
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,460

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
to simply change the password is really easy:
Code:
chroot /where/you/mounted/it
then
Code:
passwd
 
Old 05-21-2013, 07:34 AM   #7
drink76cup
LQ Newbie
 
Registered: May 2013
Posts: 10

Original Poster
Rep: Reputation: Disabled
Ponce,

I get:

chroot: cant execute '/bin/sh': No such file or directory
 
Old 05-21-2013, 07:46 AM   #8
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,460

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
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.
 
Old 05-21-2013, 07:47 AM   #9
drink76cup
LQ Newbie
 
Registered: May 2013
Posts: 10

Original Poster
Rep: Reputation: Disabled
Dont I need to mount the /bin directory, or something?
 
Old 05-21-2013, 07:50 AM   #10
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,460

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
only you know how you have partitioned your installation, normally /bin is not on its own partition (it doesn't make much sense).
 
Old 05-21-2013, 07:32 PM   #11
ljb643
Member
 
Registered: Nov 2003
Posts: 272

Rep: Reputation: Disabled
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help resetting root and user password drink76cup Linux - Newbie 1 05-21-2013 05:07 AM
Resetting root password emon1025 Linux - Newbie 2 10-26-2012 11:21 AM
resetting root password invader44 Slackware 1 08-04-2009 03:57 PM
Resetting Root password lorddecker Linux - Software 4 06-18-2004 02:48 PM
resetting root password. Reaps^ Linux - Security 1 07-06-2003 03:46 PM


All times are GMT -5. The time now is 12:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration