Can I view the password of a mounted encrypted volume?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
12
down vote

favorite
1












First: yes, this was stupid, I know



A couple weeks ago I set up a new Ubuntu 18.04 machine, and included full disk encryption. It's been running since then, just locked at night. Today I was about to reboot it to update some software, and realized I wasn't entirely certain what the boot password is. (Well, at first I was certain I didn't remember it, but now I think I've remembered it.) Still, I'd like to be sure before I reboot.



I saw a post that said that ecryptfs-unwrap-passphrase should get me the information, but running it (with or without sudo) gets me a stat: no such file or directory error. I've found a video that shows me how to extract the master key and add a new passphrase, but I worry I'll screw something up and have to start over anyway.



Any help?







share|improve this question




















  • What is the output of lsblk /dev/sda? change /dev/sda with your primary drive which Ubuntu is installed on.
    – Ravexina
    Aug 14 at 1:55






  • 1




    You mentioned you found a video, but see also: unix.stackexchange.com/a/161920/4358 . While this provides instructions on setting a new password, it also tells you how to obtain the master key.
    – Patrick
    Aug 14 at 12:18















up vote
12
down vote

favorite
1












First: yes, this was stupid, I know



A couple weeks ago I set up a new Ubuntu 18.04 machine, and included full disk encryption. It's been running since then, just locked at night. Today I was about to reboot it to update some software, and realized I wasn't entirely certain what the boot password is. (Well, at first I was certain I didn't remember it, but now I think I've remembered it.) Still, I'd like to be sure before I reboot.



I saw a post that said that ecryptfs-unwrap-passphrase should get me the information, but running it (with or without sudo) gets me a stat: no such file or directory error. I've found a video that shows me how to extract the master key and add a new passphrase, but I worry I'll screw something up and have to start over anyway.



Any help?







share|improve this question




















  • What is the output of lsblk /dev/sda? change /dev/sda with your primary drive which Ubuntu is installed on.
    – Ravexina
    Aug 14 at 1:55






  • 1




    You mentioned you found a video, but see also: unix.stackexchange.com/a/161920/4358 . While this provides instructions on setting a new password, it also tells you how to obtain the master key.
    – Patrick
    Aug 14 at 12:18













up vote
12
down vote

favorite
1









up vote
12
down vote

favorite
1






1





First: yes, this was stupid, I know



A couple weeks ago I set up a new Ubuntu 18.04 machine, and included full disk encryption. It's been running since then, just locked at night. Today I was about to reboot it to update some software, and realized I wasn't entirely certain what the boot password is. (Well, at first I was certain I didn't remember it, but now I think I've remembered it.) Still, I'd like to be sure before I reboot.



I saw a post that said that ecryptfs-unwrap-passphrase should get me the information, but running it (with or without sudo) gets me a stat: no such file or directory error. I've found a video that shows me how to extract the master key and add a new passphrase, but I worry I'll screw something up and have to start over anyway.



Any help?







share|improve this question












First: yes, this was stupid, I know



A couple weeks ago I set up a new Ubuntu 18.04 machine, and included full disk encryption. It's been running since then, just locked at night. Today I was about to reboot it to update some software, and realized I wasn't entirely certain what the boot password is. (Well, at first I was certain I didn't remember it, but now I think I've remembered it.) Still, I'd like to be sure before I reboot.



I saw a post that said that ecryptfs-unwrap-passphrase should get me the information, but running it (with or without sudo) gets me a stat: no such file or directory error. I've found a video that shows me how to extract the master key and add a new passphrase, but I worry I'll screw something up and have to start over anyway.



Any help?









share|improve this question











share|improve this question




share|improve this question










asked Aug 14 at 1:40









jbhelfrich

9817




9817











  • What is the output of lsblk /dev/sda? change /dev/sda with your primary drive which Ubuntu is installed on.
    – Ravexina
    Aug 14 at 1:55






  • 1




    You mentioned you found a video, but see also: unix.stackexchange.com/a/161920/4358 . While this provides instructions on setting a new password, it also tells you how to obtain the master key.
    – Patrick
    Aug 14 at 12:18

















  • What is the output of lsblk /dev/sda? change /dev/sda with your primary drive which Ubuntu is installed on.
    – Ravexina
    Aug 14 at 1:55






  • 1




    You mentioned you found a video, but see also: unix.stackexchange.com/a/161920/4358 . While this provides instructions on setting a new password, it also tells you how to obtain the master key.
    – Patrick
    Aug 14 at 12:18
















What is the output of lsblk /dev/sda? change /dev/sda with your primary drive which Ubuntu is installed on.
– Ravexina
Aug 14 at 1:55




What is the output of lsblk /dev/sda? change /dev/sda with your primary drive which Ubuntu is installed on.
– Ravexina
Aug 14 at 1:55




1




1




You mentioned you found a video, but see also: unix.stackexchange.com/a/161920/4358 . While this provides instructions on setting a new password, it also tells you how to obtain the master key.
– Patrick
Aug 14 at 12:18





You mentioned you found a video, but see also: unix.stackexchange.com/a/161920/4358 . While this provides instructions on setting a new password, it also tells you how to obtain the master key.
– Patrick
Aug 14 at 12:18











1 Answer
1






active

oldest

votes

















up vote
21
down vote



accepted










Full disk encryption uses cryptsetup to manage LUKS encrypted devices and not ecryptfs and ecryptfs-unwrap-passphrase is a part of ecryptfs-utils which I guess is not installed on your system and has nothing to do with your setup and encrypted volume.



The answer to your question is: No you can not see the passphrase of an encrypted LUKS volume.



What I suggest is using:



sudo cryptsetup open /dev/sdXY new_mapper


which /dev/sdXY is your encrypted partition, it will ask for your user password (sudo) and then for the passphrase. try different possible passphrases to find the correct one.



If your passphrase was wrong you will get an error:



No key available with this passphrase


otherwise (if it was correct) an message will show up complaining that device is already in use. then you are good to go and safe to reboot knowing what your passphrase is.






share|improve this answer
















  • 6




    If anyone lands here and doesn't know what to substitute for /dev/sdXY, you can run this command. cat /etc/crypttab | cut -f2 | grep -oiP "[0-9a-z]+-[0-9a-z-]+" | while read line; do ls -l /dev/disk/by-uuid/ | grep $line | awk 'print "/dev/disk/by-uuid/"$11' | xargs readlink -f ;done. It will spit out the paths for all devices referred to in /etc/crypttab.
    – b_laoshi
    Aug 14 at 2:21







  • 1




    What about grep -Poi "(?<=UUID=).*?(?=s)" /etc/crypttab | xargs -IL readlink -f /dev/disk/by-uuid/L
    – Ravexina
    Aug 14 at 7:26










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1065142%2fcan-i-view-the-password-of-a-mounted-encrypted-volume%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
21
down vote



accepted










Full disk encryption uses cryptsetup to manage LUKS encrypted devices and not ecryptfs and ecryptfs-unwrap-passphrase is a part of ecryptfs-utils which I guess is not installed on your system and has nothing to do with your setup and encrypted volume.



The answer to your question is: No you can not see the passphrase of an encrypted LUKS volume.



What I suggest is using:



sudo cryptsetup open /dev/sdXY new_mapper


which /dev/sdXY is your encrypted partition, it will ask for your user password (sudo) and then for the passphrase. try different possible passphrases to find the correct one.



If your passphrase was wrong you will get an error:



No key available with this passphrase


otherwise (if it was correct) an message will show up complaining that device is already in use. then you are good to go and safe to reboot knowing what your passphrase is.






share|improve this answer
















  • 6




    If anyone lands here and doesn't know what to substitute for /dev/sdXY, you can run this command. cat /etc/crypttab | cut -f2 | grep -oiP "[0-9a-z]+-[0-9a-z-]+" | while read line; do ls -l /dev/disk/by-uuid/ | grep $line | awk 'print "/dev/disk/by-uuid/"$11' | xargs readlink -f ;done. It will spit out the paths for all devices referred to in /etc/crypttab.
    – b_laoshi
    Aug 14 at 2:21







  • 1




    What about grep -Poi "(?<=UUID=).*?(?=s)" /etc/crypttab | xargs -IL readlink -f /dev/disk/by-uuid/L
    – Ravexina
    Aug 14 at 7:26














up vote
21
down vote



accepted










Full disk encryption uses cryptsetup to manage LUKS encrypted devices and not ecryptfs and ecryptfs-unwrap-passphrase is a part of ecryptfs-utils which I guess is not installed on your system and has nothing to do with your setup and encrypted volume.



The answer to your question is: No you can not see the passphrase of an encrypted LUKS volume.



What I suggest is using:



sudo cryptsetup open /dev/sdXY new_mapper


which /dev/sdXY is your encrypted partition, it will ask for your user password (sudo) and then for the passphrase. try different possible passphrases to find the correct one.



If your passphrase was wrong you will get an error:



No key available with this passphrase


otherwise (if it was correct) an message will show up complaining that device is already in use. then you are good to go and safe to reboot knowing what your passphrase is.






share|improve this answer
















  • 6




    If anyone lands here and doesn't know what to substitute for /dev/sdXY, you can run this command. cat /etc/crypttab | cut -f2 | grep -oiP "[0-9a-z]+-[0-9a-z-]+" | while read line; do ls -l /dev/disk/by-uuid/ | grep $line | awk 'print "/dev/disk/by-uuid/"$11' | xargs readlink -f ;done. It will spit out the paths for all devices referred to in /etc/crypttab.
    – b_laoshi
    Aug 14 at 2:21







  • 1




    What about grep -Poi "(?<=UUID=).*?(?=s)" /etc/crypttab | xargs -IL readlink -f /dev/disk/by-uuid/L
    – Ravexina
    Aug 14 at 7:26












up vote
21
down vote



accepted







up vote
21
down vote



accepted






Full disk encryption uses cryptsetup to manage LUKS encrypted devices and not ecryptfs and ecryptfs-unwrap-passphrase is a part of ecryptfs-utils which I guess is not installed on your system and has nothing to do with your setup and encrypted volume.



The answer to your question is: No you can not see the passphrase of an encrypted LUKS volume.



What I suggest is using:



sudo cryptsetup open /dev/sdXY new_mapper


which /dev/sdXY is your encrypted partition, it will ask for your user password (sudo) and then for the passphrase. try different possible passphrases to find the correct one.



If your passphrase was wrong you will get an error:



No key available with this passphrase


otherwise (if it was correct) an message will show up complaining that device is already in use. then you are good to go and safe to reboot knowing what your passphrase is.






share|improve this answer












Full disk encryption uses cryptsetup to manage LUKS encrypted devices and not ecryptfs and ecryptfs-unwrap-passphrase is a part of ecryptfs-utils which I guess is not installed on your system and has nothing to do with your setup and encrypted volume.



The answer to your question is: No you can not see the passphrase of an encrypted LUKS volume.



What I suggest is using:



sudo cryptsetup open /dev/sdXY new_mapper


which /dev/sdXY is your encrypted partition, it will ask for your user password (sudo) and then for the passphrase. try different possible passphrases to find the correct one.



If your passphrase was wrong you will get an error:



No key available with this passphrase


otherwise (if it was correct) an message will show up complaining that device is already in use. then you are good to go and safe to reboot knowing what your passphrase is.







share|improve this answer












share|improve this answer



share|improve this answer










answered Aug 14 at 2:09









Ravexina

26.8k146492




26.8k146492







  • 6




    If anyone lands here and doesn't know what to substitute for /dev/sdXY, you can run this command. cat /etc/crypttab | cut -f2 | grep -oiP "[0-9a-z]+-[0-9a-z-]+" | while read line; do ls -l /dev/disk/by-uuid/ | grep $line | awk 'print "/dev/disk/by-uuid/"$11' | xargs readlink -f ;done. It will spit out the paths for all devices referred to in /etc/crypttab.
    – b_laoshi
    Aug 14 at 2:21







  • 1




    What about grep -Poi "(?<=UUID=).*?(?=s)" /etc/crypttab | xargs -IL readlink -f /dev/disk/by-uuid/L
    – Ravexina
    Aug 14 at 7:26












  • 6




    If anyone lands here and doesn't know what to substitute for /dev/sdXY, you can run this command. cat /etc/crypttab | cut -f2 | grep -oiP "[0-9a-z]+-[0-9a-z-]+" | while read line; do ls -l /dev/disk/by-uuid/ | grep $line | awk 'print "/dev/disk/by-uuid/"$11' | xargs readlink -f ;done. It will spit out the paths for all devices referred to in /etc/crypttab.
    – b_laoshi
    Aug 14 at 2:21







  • 1




    What about grep -Poi "(?<=UUID=).*?(?=s)" /etc/crypttab | xargs -IL readlink -f /dev/disk/by-uuid/L
    – Ravexina
    Aug 14 at 7:26







6




6




If anyone lands here and doesn't know what to substitute for /dev/sdXY, you can run this command. cat /etc/crypttab | cut -f2 | grep -oiP "[0-9a-z]+-[0-9a-z-]+" | while read line; do ls -l /dev/disk/by-uuid/ | grep $line | awk 'print "/dev/disk/by-uuid/"$11' | xargs readlink -f ;done. It will spit out the paths for all devices referred to in /etc/crypttab.
– b_laoshi
Aug 14 at 2:21





If anyone lands here and doesn't know what to substitute for /dev/sdXY, you can run this command. cat /etc/crypttab | cut -f2 | grep -oiP "[0-9a-z]+-[0-9a-z-]+" | while read line; do ls -l /dev/disk/by-uuid/ | grep $line | awk 'print "/dev/disk/by-uuid/"$11' | xargs readlink -f ;done. It will spit out the paths for all devices referred to in /etc/crypttab.
– b_laoshi
Aug 14 at 2:21





1




1




What about grep -Poi "(?<=UUID=).*?(?=s)" /etc/crypttab | xargs -IL readlink -f /dev/disk/by-uuid/L
– Ravexina
Aug 14 at 7:26




What about grep -Poi "(?<=UUID=).*?(?=s)" /etc/crypttab | xargs -IL readlink -f /dev/disk/by-uuid/L
– Ravexina
Aug 14 at 7:26

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1065142%2fcan-i-view-the-password-of-a-mounted-encrypted-volume%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

Installing NextGIS Connect into QGIS 3?

One-line joke