dbus_bus_request_name():不允许连接拥有该服务

我在arm上构建了一个根文件系统。它应该运行dbus-daemon和avahi-daemon,但是当我尝试运行
avahi-daemon
$ dbus-daemon --system
$ avahi-daemon
我收到这条消息:
Found user 'avahi' (UID 4) and group 'avahi' (GID 4).
Successfully dropped root privileges.
avahi-daemon 0.6.28 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns! 
dbus_bus_request_name(): Connection ":1.0" is not allowed to own the service "org.freedesktop.Avahi" due to security policies in the configuration file
WARNING: Failed to contact D-Bus daemon.
avahi-daemon 0.6.28 exiting.
怎么了?是关于dbus配置吗?     
已邀请:
我有一个类似的问题,在我的情况下,我的系统数据包系统附带的默认avahi-dbus.conf只是在“
</busconfig>
”之前没有触发此错误的最后一个“
</policy>
”。 我首先想到的问题不是来自这个文件,因为快速查看它并不足以找到这种语法错误。     
在我的情况下,我只需要重新启动dbus服务。 这可能是因为avahi插入了一个未自动检测到的dbus配置文件(
/etc/dbus-1/system.d/avahi-dbus.conf
)。     
客户端可以在系统总线上注册什么名称有限制。否则,用户进程可以接收针对某些系统服务的请求。 这些限制是通过dbus-daemon配置文件配置的,通常为
/etc/dbus-1/system.conf
。在标准安装中,此文件包含其他配置文件,尤其是
/etc/dbus-1/system.d/
目录中的所有配置文件,其中存储了特定于服务的配置。这样DBus通常配置为Avahi: 我工作站的示例:
$ cat /etc/dbus-1/system.d/avahi-dbus.conf 
<!DOCTYPE busconfig PUBLIC
          "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
          "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- Only root or user avahi can own the Avahi service -->
  <policy user="avahi">
    <allow own="org.freedesktop.Avahi"/>
  </policy>
  <policy user="root">
    <allow own="org.freedesktop.Avahi"/>
  </policy>

  <!-- Allow anyone to invoke methods on Avahi server, except SetHostName -->
  <policy context="default">
    <allow send_destination="org.freedesktop.Avahi"/>
    <allow receive_sender="org.freedesktop.Avahi"/>

    <deny send_destination="org.freedesktop.Avahi"
          send_interface="org.freedesktop.Avahi.Server" send_member="SetHostName"/>
  </policy>

  <!-- Allow everything, including access to SetHostName to users of the group "adm" -->
  <policy group="adm">
    <allow send_destination="org.freedesktop.Avahi"/>
    <allow receive_sender="org.freedesktop.Avahi"/>
  </policy>
  <policy user="root">
    <allow send_destination="org.freedesktop.Avahi"/>
    <allow receive_sender="org.freedesktop.Avahi"/>
  </policy>
</busconfig>
确保您具有这些标准配置文件或适当的自定义配置。     

要回复问题请先登录注册