Hi.
I have disabled (or to be more precise: masked) systemd-hostnamed and all is fine, execept for the fact that the in the journal log I often see these warnings:
feb 20 14:55:31 hal9000 NetworkManager[289]: <info> [1613829331.9855] hostname: hostname: hostnamed not used as proxy creation failed with: Error calling StartServiceByName for org.freedesktop.hostname1: Unit dbus-org.freedesktop.hostname1.service is masked.
feb 20 14:56:53 hal9000 NetworkManager[267]: <info> [1613829413.7662] hostname: hostname: hostnamed not used as proxy creation failed with: Error calling StartServiceByName for org.freedesktop.hostname1: Unit dbus-org.freedesktop.hostname1.service is masked.
Is similar to what I have encountered when disabling systemd-homed:
In such case an user, @xabbu , indicated me to rename /etc/pam.d/pam_systemd_home.so to /etc/pam.d/pam_systemd_home.so.bak for avoid the continuos warning message in the journal log; there is a way for doing the same for systemd-hostnamed?
I see that the warning come from NetworkManager; so maybe I have to make something in /etc/NetworkManager/conf.d/ directory? Eg here I have made a conf file /etc/NetworkManager/conf.d/no-systemd-resolved.conf since I also got rid of systemd-resolved.
If I do a search, there are no results for systemd-hostnamed=false.
Obviously has nothing to do with systemd-homed; I was asking how to avoid journal logs warning about systemd-hostnamed.
The system works fine with hostnamed masked; is just a “costmetic” thing of the journal log.
Is an unit which I don’t need; when is unmasked (is a static unit, so the masking is the way for disabling it) no warning about this in the log, but futhermore, it increase the startup time.
On my system I have disabled everything that I don’t need and haven’t bork anything.
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Hostname Service
Documentation=man:systemd-hostnamed.service(8)
Documentation=man:hostname(5)
Documentation=man:machine-info(5)
Documentation=man:org.freedesktop.resolve1(5)
[Service]
BusName=org.freedesktop.hostname1
CapabilityBoundingSet=CAP_SYS_ADMIN
ExecStart=/usr/lib/systemd/systemd-hostnamed
IPAddressDeny=any
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
PrivateDevices=yes
PrivateNetwork=yes
PrivateTmp=yes
ProtectProc=invisible
ProtectControlGroups=yes
ProtectHome=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=strict
ReadWritePaths=/etc
RestrictAddressFamilies=AF_UNIX
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallArchitectures=native
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service sethostname
WatchdogSec=3min
My journald says: systemd[1]: systemd-hostnamed.service: Succeeded.
One entry. no more.
Probably you have killed parts of important dependencies??
Even egoists are NOT alone
Because is not masked; if you read more accurately my first post, you’ll figure out that the warning occurs when is masked, and is a warning that only occurs once, on startup.
Answer is: NO
EDIT:
What do you not understand about NO
(Coffe-machine does not work without water - although you only want to drink coffee)
((or, question: how to get fried snowballs)
However I tried (by replicating such unit as suggested in the Arch Wiki) but doesn’t help: I still get the warning message about such unit with an error about starting timeout.
Also dbus-daemon looks for it; this also occurs when I launch catfish files search:
feb 22 10:11:25 hal9000 dbus-daemon[266]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.682' (uid=1000 pid=650048 comm="/usr/bin/python /usr/bin/catfish ")
feb 22 10:11:25 hal9000 dbus-daemon[266]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.hostname1.service': Unit dbus-org.freedesktop.hostname1.service is masked.