Bug#965062: systemd: Cannot resolve user name systemd-network: No such process
    Marc Lehmann 
    schmorp at schmorp.de
       
    Thu Jul 16 05:24:53 BST 2020
    
    
  
On Wed, Jul 15, 2020 at 03:30:30PM +0200, Michael Biebl <email at michaelbiebl.de> wrote:
> systemctl status systemd-networkd
● systemd-networkd.service - Network Service
   Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2020-07-16 04:15:32 UTC; 23s ago
     Docs: man:systemd-networkd.service(8)
  Process: 854 ExecStart=/lib/systemd/systemd-networkd (code=exited, status=1/FAILURE)
 Main PID: 854 (code=exited, status=1/FAILURE)
Jul 16 04:15:32 pxe systemd[1]: systemd-networkd.service: Main process exited, code=exited, status=1/FAILURE
Jul 16 04:15:32 pxe systemd[1]: systemd-networkd.service: Failed with result 'exit-code'.
Jul 16 04:15:32 pxe systemd[1]: Failed to start Network Service.
Jul 16 04:15:32 pxe systemd[1]: systemd-networkd.service: Service has no hold-off time (RestartSec=0), scheduling restart.
Jul 16 04:15:32 pxe systemd[1]: systemd-networkd.service: Scheduled restart job, restart counter is at 5.
Jul 16 04:15:32 pxe systemd[1]: Stopped Network Service.
Jul 16 04:15:32 pxe systemd[1]: systemd-networkd.service: Start request repeated too quickly.
Jul 16 04:15:32 pxe systemd[1]: systemd-networkd.service: Failed with result 'exit-code'.
Jul 16 04:15:32 pxe systemd[1]: Failed to start Network Service.
> getent passwd systemd-network
systemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false
> systemctl cat systemd-networkd
> And your /etc/nsswitch.conf
Attached.
Additionally, when I run /lib/systemd/systemd-networkd manually, it works (as
root), so maybe it's a permissions problem:
   # /lib/systemd/systemd-networkd
   eth0: Gained IPv6LL
   Enumeration completed
   eth0: DHCPv4 address 10.0.0.73/25 via 10.0.0.5
   lo: Configured
   eth0: Configured
However, even non-root users can resolve the passwd entry just fine it seems:
   # su -c "getent passwd systemd-network" -s /bin/sh nobody
   systemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false
Lastly, "No such process" seems to be a peculiar error, but it seems to be
generated by logic in the systemd code (which, btw., seems to errornously
assume that errno is 0 when a library call succeeds, in a lot of places -
fortunately only for error reporting it seems).
-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\
-------------- next part --------------
# /lib/systemd/system/systemd-networkd.service
#  SPDX-License-Identifier: LGPL-2.1+
#
#  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=Network Service
Documentation=man:systemd-networkd.service(8)
ConditionCapability=CAP_NET_ADMIN
DefaultDependencies=no
# systemd-udevd.service can be dropped once tuntap is moved to netlink
After=systemd-udevd.service network-pre.target systemd-sysusers.service systemd-sysctl.service
Before=network.target multi-user.target shutdown.target
Conflicts=shutdown.target
Wants=network.target
[Service]
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
ExecStart=!!/lib/systemd/systemd-networkd
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectKernelModules=yes
ProtectSystem=strict
Restart=on-failure
RestartSec=0
RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET
RestrictNamespaces=yes
RestrictRealtime=yes
RuntimeDirectory=systemd/netif
RuntimeDirectoryPreserve=yes
SystemCallArchitectures=native
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service
Type=notify
User=systemd-network
WatchdogSec=3min
[Install]
WantedBy=multi-user.target
Also=systemd-networkd.socket
Alias=dbus-org.freedesktop.network1.service
# We want to enable systemd-networkd-wait-online.service whenever this service
# is enabled. systemd-networkd-wait-online.service has
# WantedBy=network-online.target, so enabling it only has an effect if
# network-online.target itself is enabled or pulled in by some other unit.
Also=systemd-networkd-wait-online.service
-------------- next part --------------
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd:         files systemd
group:          files systemd
shadow:         files
gshadow:        files
hosts:          files dns
networks:       files
protocols:      db files
services:       db files
ethers:         db files
rpc:            db files
netgroup:       nis
    
    
More information about the Pkg-systemd-maintainers
mailing list