Hostnames

Source

In CentOS/RHEL are three kinds of hostnames defined:

  1. Static
  2. transient
  3. pretty

The static hostname (kernel hostname) is initialized from /etc/hostname at boot time.

The transient hostname is a temporary hostname assigned at runtime, e.g. by DHCP or mDNS. Both, static and transient hostnames follow the same character restriction rules as internet domain names.

The pretty hostnames are allowed to have a free-form (including special and whitespace characters) hostname and shown to the end-user.

The command utility to manage hostname is called hostnamectl.

$ hostnamectl status [--static|--transient|--pretty]

To change all three hostnames at simultaneously:

$ sudo hostnamectl set-hostname <hostname>

No reboot required to make the change active.

The official RedHat recommendation is that static and transient names match the FQDN of the host.

Firewalld

dbus error

Source

When trying to start the service 'firewalld' on a centos 7.2 box, the following error occurs:

$ systemctl start firewalld
$ systemctl status firewalld
...
dbus[754]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.13" (uid=0 pid=28834 comm="/usr/bin/python -Es
 /usr/sbin/firewalld --nofork -") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.ServiceUnknown" requested_reply="0" destination=":1.14" (u
id=0 pid=28888 comm="/usr/bin/python -Es /usr/bin/firewall-cmd --perman")

dbus-daemon: dbus[754]: [system] Rejected send message, 0 matched rules; type="error", sender=":1.13" (uid=0 pid=28834 comm="/usr/b
in/python -Es /usr/sbin/firewalld --nofork -") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.ServiceUnknown" requested_reply="0" destinati
on=":1.14" (uid=0 pid=28888 comm="/usr/bin/python -Es /usr/bin/firewall-cmd --perman")

Basically: Starting the service fails, though the command seems to succeed.

Solution

Install the following packages (if missing)

  • polkit
  • polkit-pkla-compat