什么启动帐户守护程序?

Ser*_*nyy 7 command-line upstart init services

问题很简单:是什么在 Ubuntu 14.04 上启动了帐户服务守护进程?

root     11495     1  0 13:55 ?        00:00:00 /usr/lib/accountsservice/accounts-daemon
Run Code Online (Sandbox Code Playgroud)

pstree 告诉我它是由 init 启动的

init-+-ModemManager---2*[{ModemManager}]
     |-NetworkManager-+-dhclient
     |                |-dnsmasq
     |                `-3*[{NetworkManager}]
     |-accounts-daemon---2*[{accounts-daemon}]
Run Code Online (Sandbox Code Playgroud)

但是当我这样做时sudo grep -iR 'accounts-daemon' /etc/*它什么都不返回,所以很明显在启动该守护进程的/etc/init/etc/init.d/etc/rc*.d目录中没有任何内容,因此问题是,它在哪里?

我的主要目标是在启动时禁用帐户服务守护程序的自动启动。

use*_*.dz 5

这是一个 DBUS 服务。

root@user-VirtualBox:~# grep -ir accounts-daemon /usr /etc
Binary file /usr/lib/accountsservice/accounts-daemon matches
/usr/share/dbus-1/system-services/org.freedesktop.Accounts.service:Exec=/usr/lib/accountsservice/accounts-daemon
Run Code Online (Sandbox Code Playgroud)

其它的办法:

root@user-VirtualBox:~# dpkg -S /usr/lib/accountsservice/accounts-daemon
accountsservice: /usr/lib/accountsservice/accounts-daemon

root@user-VirtualBox:~# dpkg -L accountsservice
/.
/usr
/usr/share
/usr/share/dbus-1
/usr/share/dbus-1/system-services
/usr/share/dbus-1/system-services/org.freedesktop.Accounts.service
/usr/share/dbus-1/interfaces
/usr/share/dbus-1/interfaces/org.freedesktop.Accounts.xml
/usr/share/dbus-1/interfaces/org.freedesktop.Accounts.User.xml
...
Run Code Online (Sandbox Code Playgroud)

要禁用它,请重命名 DBUS 服务文件:

sudo mv /usr/share/dbus-1/system-services/org.freedesktop.Accounts.service /usr/share/dbus-1/system-services/org.freedesktop.Accounts.service.disabled
Run Code Online (Sandbox Code Playgroud)