Linux OSBN/Ubuntuusers Planet XING / LinkedIn / Amazon

Uyuni: Cannot read/write ‘/var/lib/salt/.ssh/known_hosts’. Please check permissions.

Recently I stumbled upon the following error when registering a new openSUSE system in Uyuni:

Error message during registration

The appropriate file simply did not exist – but the folder was created:

# file /var/lib/salt/.ssh/known_hosts
known_hosts: cannot open `known_hosts' (No such file or directory)
# ls -lad /var/lib/salt/
drwxr-xr-x 1 salt salt 8 Jun 24 14:49 /var/lib/salt/
uyuni:/home/christian # ls -lad /var/lib/salt/.ssh
drwx------ 1 salt salt 22 Jun 25 08:37 /var/lib/salt/.ssh

The solution was really trivial – the file was created and permissions were assigned:

# touch /var/lib/salt/.ssh/known_hosts
# chmod 0600 /var/lib/salt/.ssh/known_hosts
# chown salt: /var/lib/salt/.ssh/known_hosts

Afterwards registering the host was working again:

Registration working again

Affected packages:

# rpm -qa|grep -i uyuni-
uyuni-doc-indexes-2020.06-3.1.uyuni.noarch
release-notes-uyuni-2020.06-1.1.uyuni.x86_64
uyuni-docs_en-2020.06-2.1.uyuni.noarch
rhn-org-httpd-ssl-key-pair-uyuni-1.0-1.noarch
python3-uyuni-common-libs-4.1.5-1.2.uyuni.x86_64
uyuni-build-keys-2020.06-1.1.uyuni.noarch
uyuni-docs_en-pdf-2020.06-2.1.uyuni.noarch
uyuni-base-common-4.1.1-1.1.uyuni.x86_64
uyuni-build-keys-web-2020.06-1.1.uyuni.noarch
uyuni-base-server-4.1.1-1.1.uyuni.x86_64
uyuni-cluster-provider-caasp-4.1.1-2.1.uyuni.noarch
Uyuni-Server-release-2020.06-78.2.uyuni.x86_64

I think I also had this issue with SUSE Manager 4.0.x somewhen..

Sharing is caring

3 Comments Add New Comment

  1. Martin Lonkwitz says:

    Hallo Christian,

    bei dem “chown” ist Dir ein Syntax-Fehler unterlaufen. Die Doppelpunkte nach dem User-Namen müssen weg.

    Viele Grüße Martin

    1. Christian says:

      Hey Martin,

      der leere Doppelpunkt ist bewusst. 🙂

      Wenn man eine “leere” Gruppe angibt, wird der Benutzername auch gleich als Gruppe gesetzt:


      # ls -la dummy
      -rw-rw-r-- 1 cstankow cstankow 0 Jun 29 17:09 dummy
      # chown root: dummy
      # ls -la dummy
      -rw-rw-r-- 1 root root 0 Jun 29 17:09 dummy

      Beste Grüße,
      Christian.

Leave a Reply

Your email address will not be published. Required fields are marked *