How do I find the passphrase which encrypts my home directory?
With ecryptfs-unwrap-passphrase
[On the off-chance that there's not something funny about this question, maybe there's a legitimate language barrier or some other issue, might as well make it an "official answer"]
Hints:
-
You might want to make a backup of eCryptfs's important files too, in
/home/.ecryptfs/<user>/.ecryptfs/
especially thewrapped-passphrase
file - if it gets damaged your home's really inaccessible even if you remember the passphrase.The
ecryptfs-unwrap-passphrase
tool takes that file and your passphrase, and reveals the actual "random" encryption key. Your actual encrypted files are stored in
/home/.ecryptfs/<user>/.Private/
, but alone they're useless without thewrapped-passphrase
file + passphrase.You should have a backup of any important files in your encrypted home, it's a lot easier than trying to recover from failing drives or overwritten encryption.
[eCryptfs encrypted home - explanation - on Superuser]
Related videos on Youtube
Ben Peretz
Updated on September 18, 2022Comments
-
Ben Peretz almost 2 years
I have been trying to create a program that sends multiple packets via sendto to different IP addresses, but after exactly 1238 callings to sendto I'm getting the error: "SendTo: Invalid argument" (printed by perror). Edit: After an hour the number of callings to sendto is exactly 1231 and remains like that every run. After I added a code that prints something on the screen, it was back to 1238 callings every run until error, deleted that code, it became 1241 and about an hour later it's 1231. If I take down the IP addresses (making the aliases offline), it sends those packets correctly without an error but it get stuck for a moment after about every 500 sendto callings,
This error only happens when those IP addresses are not in the same server, when they are in the same server (aliases) the sendto works correctly. Also, the error doesn't appear when sending to the same IP multiple times instead of multiple times to different IP addresses.
I have tried different fixes that I found when searching in Google. I have tried playing with the configurations in sysctl.conf file, raised the send buffer, somaxconn, backlog, and other things.. When I raised the send buffer, I have also raised the buffer in the application itself.
Here is the sample code I have written: http://pastebin.com/FCn0ALzn
And the code that gives the error:
for (size_t i = 0; i < ips.size(); i++) { cout << i << ") Sending message to: " << ips[i] << endl; server.sin_addr.s_addr = inet_addr(ips[i].c_str()); n = sendto(sock, buffer, strlen(buffer), 0, (const struct sockaddr *)&server, length); if (n < 0) { perror("Sendto"); return; } }
-
molbdnilo over 7 yearsPut the code in the question. And read about why
while (!file.eof())
is wrong. -
nos over 7 yearsAre you sure
ips[i].c_str()
returns a valid IP address, and you're not passing some string toinet_addr()
that it cannot parse after 1238 calls ? -
Stephen Kitt over 6 yearsThe dialog box tells you how to find the recovery passphrase, doesn’t it?
-
Alessio over 6 yearsI'm voting to close this question as off-topic because this question is not about unix or linux, it's about failing to read the explicit instructions on screen that directly answers the question asked by providing the exact command line to run (
ecryptfs-unwrap-passphrase
). -
spraff over 6 yearsSincerely, thank you for pointing out the obvious. I was very tired :-/
-
-
Ben Peretz over 7 yearsI have printed the output of
ips[i].c_str()
and the output ofserver.sin_addr
using inet_ntoa, they both printed the correct IP.