7

Question is simple: what starts the accounts service daemon on Ubuntu 14.04?

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

pstree tells me that it's started by init

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

But when I do sudo grep -iR 'accounts-daemon' /etc/* it returns nothing, so obviously there is nothing in /etc/init or /etc/init.d or /etc/rc*.d directories that starts that daemon, hence the question, where is it ?

My main goal is to disable autostart of the accounts services daemon on boot.

terdon
  • 100,812
Sergiy Kolodyazhnyy
  • 105,154
  • 20
  • 279
  • 497
  • First observation: Very high PID, therefore it may be something later in bootup. Perhaps a script in init.d calls something else which calls the daemon? – Daniel Oct 13 '15 at 22:00
  • If you just want to disable it, track it down and change the executable filename – Daniel Oct 13 '15 at 22:01
  • And maybe replace it with a simple false. – Daniel Oct 13 '15 at 22:01
  • 1
    @Daniel well, I considered disabling the filename, but i would like to do it the clean, honest way. Also, it's quite possible it's a chain of scripts, but at least it's nowhere in the /etc folder – Sergiy Kolodyazhnyy Oct 13 '15 at 22:04
  • I would at least try changing the filename, because if nothing else you could see what errors get thrown. Whatever calls it should complain about not finding it – Daniel Oct 13 '15 at 22:06
  • Why did you want to disable it? On my system it seemed to be the cause of high memory usage in things like unity-settings-daemon and sound-indicator-service. – Jelle De Loecker Dec 26 '15 at 15:54
  • @skerit It's actually a sort of ironic story. The big purpose was to allow setting permanent wallpaper on the login screen (also known as greeter). When you flip through list of users there, dbus polls accounts daemon, and displays what is set in user preferences. However, I've forgotten that I've posted a solution to my own problem and forgot about it about a year ago. During my research I've been aware that accounts daemon was taking high memory usage. AFAIK there have been patches released in newer versions just for that. – Sergiy Kolodyazhnyy Dec 26 '15 at 18:22
  • As for wallpaper part . . . I've learned that with unity-greeter you can recompile a specific glib schema and for lightdm-gtk-greeter it is sufficient to disable showing usernames on the login screen, so user has to type in manually username and password. That will prevent polling accounts daemon and revert to settings in /etc/lightdm/lightdm-gtk-greeter.conf I even wrote script sfor that – Sergiy Kolodyazhnyy Dec 26 '15 at 18:24

2 Answers2

5

It's a DBUS service.

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

Another way:

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

To disable it, rename DBUS service file:

sudo mv /usr/share/dbus-1/system-services/org.freedesktop.Accounts.service /usr/share/dbus-1/system-services/org.freedesktop.Accounts.service.disabled
user.dz
  • 48,105
2

Yet another way...

To get the filename:

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

Stop it and remove accountsservice package by running:

sudo service accounts-daemon stop
sudo apt remove accountsservice

It will also remove package user-manager, but do not worry about it :)

Additional info:

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