keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
21.34k stars 1.47k forks source link

Can't load password safe from network paths #857

Closed DMW007 closed 7 years ago

DMW007 commented 7 years ago

Expected Behavior

It should be possible to open a password safe from network paths (e.g. SMB), like in KeePass (testet on Windows).

Current Behavior

Currently, it's only possible to open local files like on the / filesystem (e.g. /home/my-user/). The dialog doesn't show network addresses like the dolphin file explorer does.

Steps to Reproduce (for bugs)

Simply try to open a password safe file from KeePassXC

Context

I've stored all my data on a local centralized NAS, which is accessed by SMB. So I can store my data at a single place, and use it on different computers/notebooks. On Windows 8/10, this was no problem. I simply mounted the folder as network share, and could use them in all applications. But now I'm trying to migrate to Linux where possible. Here it seems not possible from the open file dialog to select network paths like SMB as data source.

For me it seems a common scenario both for IT experts and also persons with multiple devices (computers, laptops). Larger familys could likely use a centralized NAS too, so that they keep the data from everyone in a centralized place, which make it easyer to access and backup.

Debug Info

KeePassXC - 2.2.0 (uApp)

Operating system: Kubuntu 17.04 CPU architecture: x64 Kernel: 4.0.10-30

Enabled extensions: None, it's a fresh install using uApp Explorer without any additional software or other modifications.

rodorgas commented 7 years ago

I've just run into this issue. Would like to add that when I mount using FUSE (via Nautilus), I can open the database normally. But when I mount using mount -t cifs, the folder doesn't show up on KeePassXC file explorer.

gilgongo commented 7 years ago

Also applies to keyfiles stored on network mounts (NFS and SMB). KeepPassX supports this (on Linux at least) which prevents me from migrating to KPXC.

DMW007 commented 7 years ago

I found out that it works when I open the network path using Dolphin file explorer and then open the password safe file via click on it. Then KeePassXC is opened, and asks me for the passwords. To avoid navigate through Dolphin, create a shortcut on the desktop. This works, too.

In my point of view, that's a suiteable workaround. But I still think, that this ticket is a bug, which should be fixed. Especially for newer user with less experience. They may think that KeePassXC doesn't work for their situation with network folders.

gilgongo commented 7 years ago

AFAIKT, the workaround doesn't apply to key files. So you can't use KeePassXC if you want to store those on network drives.

droidmonkey commented 7 years ago

Are you all using the snap install?

gilgongo commented 7 years ago

@droidmonkey Yes. Shall I try the package?

bullet64 commented 7 years ago

I am using NFS Share and no problem with Database when using password protection. It fails on my notebook with yubikey !?

Notebook using AppImage. Mainsystem using an compiled version.

Both systems on LinuxMintCinnamon 18.2

droidmonkey commented 7 years ago

Snaps are inherently isolated and there is a bug in snapd that doesnt show the network folders that are accessible because I enabled the permission. If you type the beginning of the network path in the open file dialog it will bring you to the folder. You cannot navigate to the folder by using the tree unfortunately.

gilgongo commented 7 years ago

@droidmonkey Tried pasting the path (/mnt/srv/keyfile.key) and it didn't pick it up (nor could I see the files in /mnt/srv from the open file dialog). I'll try the package not the snap.

droidmonkey commented 7 years ago

Ok if the package version does it as well then I'll reopen.

gilgongo commented 7 years ago

The AppImage works fine with network paths on my Ubuntu 17.04

tremby commented 7 years ago

This affects me too.

I want to load my database from a symlink in my home directory which points to an NFS-mounted directory containing the database. This works with the AppImage version but not with the snap version.

droidmonkey commented 7 years ago

Symlinks do not grant you any special access. You have to have access to the destination for a symlink to work, period.

tremby commented 7 years ago

I get that.

So you're saying it's as designed that the snap version is different from the AppImage version it terms of access to the filesystem?

Is there some way to override the access so the snap can access my NFS share?

droidmonkey commented 7 years ago

No. Snaps are an entire sandboxed ecosystem. I hate that Ubuntu continues to sell them as universal happy fun-time solve the worlds problem solutions. They are absolutely not any of that. From their own website:

Snaps are designed to be secure, sandboxed, containerised applications isolated from the underlying system and from other applications. Snaps allow the safe installation of apps from any vendor on mission critical devices and desktops.

If you want to access anything it MUST BE MOUNTED in your /home/[user]/ directory or in /media/*.

tremby commented 7 years ago

Huh, I see. Thanks for explaining it. I agree that it doesn't seem good. Surely any snap app could still wreak havoc on any files in my home partition, including files written by other snap apps.

An official deb would be great, in that case.

ThatMandem commented 6 years ago

I know this is an old issue, but I ran into the exact same issue and managed to solve it with a Registry edit I found on the Microsoft 'Answers' website.

I've found answer to this.

You need to modify the registry.

  1. Open regedit

  2. HKEY_LOCAL_MACHINE -> SOFTWARE -> Microsoft -> Windows -> CurrentVersion -> Policies -> System

  3. On the right, you will see ConsentPromptBehaviorAdmin, ConsentPromptBehaviorUser ... etc.

  4. click on empty space, ADD DWORD(32bit), then name it "EnableLinkedConnections". Double click it and set the data to 1.

  5. Reboot and you will see the mapped drives showing.

This has worked for me.

All credits go to https://answers.microsoft.com/en-us/profile/ef89a414-a017-4a59-b324-25522c738fa8 this user.

ignacio82 commented 6 years ago

I'm having this same issue. Ubuntu 18.04 KeePassXC 2.3.3 installed from the snap. I cannot open a file that is in a mounted nfs folder:

image

In the screenshot you can see that KeePassXC cannot see the kdbx folder.

KeepassX from the software center does not have this problem

droidmonkey commented 6 years ago

What is the kdbx folder symlinked to? That is not an actual folder.

ignacio82 commented 6 years ago

@droidmonkey kdbx is symlinked to an nfs share. This is the fstab:

192.168.86.198:/volume1/kbx /nfs/kdbx   nfs    auto  0  0

and this is the link:

ignacio@ignacio-XPS-8930:~$ ls -la kdbx
lrwxrwxrwx 1 ignacio ignacio 9 Jul  7 15:09 kdbx -> /nfs/kdbx
droidmonkey commented 6 years ago

As discussed just above in this thread, you need to mount it in /media or directly in your home directory.

MariusKl commented 3 years ago

My workaround: Navigate to the .kdxb file in the FileManager. Right click on the file "Open with KeepassXC". Afterwards it is part of the "Recently used databases" and hence it is possible to open it quite fast in the future.

But still wondering why the internal KeepassXC file manager does not display network shares.