I'm trying to use the secret-tool command to store a secret securely in a running headless CentoS 7.5.1804 Docker container, but can't seem to find which packages and/or configuration is necessary to make this work successfully.
Specifically, I want to be able to run this command:
printf "aPassword" | secret-tool store --label="test" foo bar And be able to see that password by running:
secret-tool lookup foo bar When I run the secret-tool store command, I get this:
printf 'aPassword' | secret-tool store --label="test" foo bar ** Message: Remote error from secret service: org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.Secret.Collection' on object at path /org/freedesktop/secrets/collection/login secret-tool: No such interface 'org.freedesktop.Secret.Collection' on object at path /org/freedesktop/secrets/collection/login I've followed the ArchLinux Gnome/Keyring wiki page and attempted to do the same on a CentOS Docker container via the following steps:
docker run --privileged -it centos:centos7.5.1804 /bin/bash # remainder of commands are in the container bash shell: printf 'search localhost.localdomain\nnameserver 8.8.8.8\nameserver 8.8.4.4' > /etc/resolv.conf yum -y update yum -y install sudo gnome-keyring libsecret dbus-x11 yum clean all && rm -rf /var/cache/yum export DISPLAY=“:0.0” eval "$(dbus-launch --sh-syntax)" mkdir -p ~/.cache mkdir -p ~/.local/share/keyrings eval $(gnome-keyring-daemon --start) export SSH_AUTH_SOCK From what I can tell, this should provide everything needed (gnome-keyring daemon, dbus session and secret-tool + libsecret) to allow the secret-tool store command to succeed, but if fails.
What am I missing?