- First, if the data's important I'd make a backup copy of everything before attempting to restore (& overwrite) any more files.
If I understand correctly, you've overwritten only some of your encrypted home files, with old backup copies from a different user & system? I'm not sure if or how well this can be recovered...
Each time an encrypted home is set up with eCryptfs it uses a new (pseudo) random "MOUNT passphrase" which is encrypted (wrapped) with your login passphrase. Using the same login passphrase on different systems wouldn't help with decrypting files if the
wrapped-passphrase file has been overwritten or lost, since each encrypted home is supposed to have a different mount passphrase. (The
ecryptfs-migrate-home script advises to record the mount passphrase ASAP, but I don't think most users see the warning if Ubuntu automatically sets up their encrypted home).
If you've only set up the encrypted home once and have been copying that to each new system, they all should use the same mount passphrase. But then I'd kind of think that all the files should already be decrypting correctly...
If you have a backup copy of the
wrapped-passphrase file from that same system, or the actual mount passphrase, then the following should work to decrypt some files...
- Try the
ecryptfs-recover-private program/script, it will search for any
.Private folders (or a specified folder) and attempt to find a
wrapped-passphrase or mount passphrase and decrypt the files.
If it doesn't work as-is, you could try using a backup copy of the
wrapped-passphrase file for that user & system, it should have the correct mount passphrase.
Or, if it has trouble finding the
wrapped-passphrase file, you could always run
ecryptfs-unwrap-passphrase on the correct
wrapped-passphrase file, then use the resulting mount passphrase with
All of the eCryptfs tools should work well from a live dvd/usb, or just another user on the same system, but I'm not too sure what they do if there's multiple encrypted (
.Private) folders. And most of the tools are just bash scripts, so if you want more details or to try it yourself just take a look, for example with
less $(which ecryptfs-recover-private)
And there's also the
verbose option that could be used with mount directly, it might have some info on why it's not decrypting a few files, but it also warns "Do not run eCryptfs in verbose-mode unless you are doing so for the sole purpose of development, since secret values will be written out to the system log" so I'd only try it when running from a live DVD/USB (where log files are only in RAM & lost on reboot).