Bug 446051 - Vaults not recognized after changing username
Summary: Vaults not recognized after changing username
Status: ASSIGNED
Alias: None
Product: Plasma Vault
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Ivan Čukić
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-24 21:58 UTC by mipacig156
Modified: 2021-11-26 07:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mipacig156 2021-11-24 21:58:41 UTC
SUMMARY

I upgraded from Kubuntu 20.10 to Kubuntu 21.10, but my old vault isn't showing up in the widget, even though I can see the files in `~/.local/share/plasma-vault/VAULT-NAME.enc/*` (there's a bunch of 3-character directories and a `cryfs.config`) and the directory `~/Vaults/VAULT-NAME` exists (but it's empty, as expected). Any idea what I need to do for the vault to be recognized?

During the upgrade, I also chose a different username, so my `/home/{username}` directory is different. Maybe `cryfs.config` is using absolute paths? The file seems to be binary and I don't know which format it uses, so I can't tell what's inside.

I can create new vaults without issues.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Kubuntu 21.10
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Ivan Čukić 2021-11-24 22:02:34 UTC
Hi,

The paths are stored as absolute paths in $HOME/.config/plasmavaultrc so that is the place you need to update them.

Advised approach:
killall kded5
edit the file - replace all /home/OLD_USERNAME with /home/NEW_USERNAME
kded5

This should do the trick.
Comment 2 mipacig156 2021-11-25 23:26:27 UTC
Thanks, Ivan! It worked!

I think it'd be great if paths were relative to the home directory. Wdyt?
Comment 3 Ivan Čukić 2021-11-26 07:51:20 UTC
Some FUSE modules don't like relative paths, so this would need to be handled by Vault. I'm trying to keep the 'smart' functionality to a minimum - to keep the attack surface as small as possible. I'll have to think about $HOME and whether it can be used to trick the user somehow.