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:
The appropriate file simply did not exist - but the folder was created:
1# file /var/lib/salt/.ssh/known_hosts
2known_hosts: cannot open 'known_hosts' (No such file or directory)
3
4# ls -lad /var/lib/salt/
5drwxr-xr-x 1 salt salt 8 Jun 24 14:49 /var/lib/salt/
6
7# ls -lad /var/lib/salt/.ssh
8drwx------ 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:
1# touch /var/lib/salt/.ssh/known_hosts
2# chmod 0600 /var/lib/salt/.ssh/known_hosts
3# chown salt: /var/lib/salt/.ssh/known_hosts
Afterwards registering the host was working again.
Affected packages:
1# rpm -qa|grep -i uyuni-
2uyuni-doc-indexes-2020.06-3.1.uyuni.noarch
3release-notes-uyuni-2020.06-1.1.uyuni.x86_64
4uyuni-docs_en-2020.06-2.1.uyuni.noarch
5rhn-org-httpd-ssl-key-pair-uyuni-1.0-1.noarch
6python3-uyuni-common-libs-4.1.5-1.2.uyuni.x86_64
7uyuni-build-keys-2020.06-1.1.uyuni.noarch
8uyuni-docs_en-pdf-2020.06-2.1.uyuni.noarch
9uyuni-base-common-4.1.1-1.1.uyuni.x86_64
10uyuni-build-keys-web-2020.06-1.1.uyuni.noarch
11uyuni-base-server-4.1.1-1.1.uyuni.x86_64
12uyuni-cluster-provider-caasp-4.1.1-2.1.uyuni.noarch
13Uyuni-Server-release-2020.06-78.2.uyuni.x86_64
I think I also had this issue with SUSE Manager 4.0.x somewhen..