什么启动 accounts-daemon?

什么启动 accounts-daemon?

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

root     11495     1  0 13:55 ?        00:00:00 /usr/lib/accountsservice/accounts-daemon

pstree告诉我它是由 init 启动的

init-+-ModemManager---2*[{ModemManager}]
     |-NetworkManager-+-dhclient
     |                |-dnsmasq
     |                `-3*[{NetworkManager}]
     |-accounts-daemon---2*[{accounts-daemon}]

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

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

答案1

这是一个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

其他方式:

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
...

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

sudo mv /usr/share/dbus-1/system-services/org.freedesktop.Accounts.service /usr/share/dbus-1/system-services/org.freedesktop.Accounts.service.disabled

答案2

还有另一种方法...

获取文件名:

$ ps aux | grep -i accounts-daemon
root       718  5.6  0.7 398588 121280 ?       Rsl  Jan11 151:58 /usr/lib/accountsservice/accounts-daemon

通过运行以下命令停止它并删除 accountsservice 包:

sudo service accounts-daemon stop
sudo apt remove accountsservice

它还将删除包user-manager,但不要担心:)

附加信息:

Package: accountsservice
Description: query and manipulate user account information
Package: user-manager
Description: user management tool for the Plasma workspace

相关内容