How to Fix Failed to Start accounts daemon service in Ubuntu

The AccountsService daemon (accounts-daemon.service) provides a D-Bus interface for querying and manipulating local user account metadata on Ubuntu, including user display names, avatars, login shells, and desktop session types. When systemd logs: Failed to start accounts-daemon.service – Accounts Service, desktop login managers (such as GDM or LightDM) frequently crash or hang on a black screen without rendering user login avatars. This breakdown typically originates from corrupted user profile metadata in /var/lib/AccountsService/, D-Bus communication socket errors, or incorrect file permissions.

Inspect AccountsService Status and Journal Output

Querying systemd logs reveals whether the daemon aborted due to configuration parsing errors or missing system groups:

  1. Switch to a virtual console terminal by pressing Ctrl + Alt + F3 and log in with your administrative credentials.
  2. Check the service operational state:
    systemctl status accounts-daemon.service
  3. Inspect recent detailed error logs from the systemd journal:
    journalctl -u accounts-daemon.service -b --no-pager -n 50
  4. Look for log entries indicating malformed user files or D-Bus daemon timeouts.

Purge Corrupted User Metadata in /var/lib/AccountsService/

An unexpected power interruption or sudden reboot while editing user settings can corrupt the accounts cache file:

  1. Navigate to the AccountsService storage directory:
    cd /var/lib/AccountsService/users/
  2. List all stored user metadata files:
    ls -la
  3. If any user file contains zero bytes, null characters, or invalid syntax, back up and remove the corrupted user file:
    sudo mv username /tmp/username_backup
  4. Restart the service:
    sudo systemctl restart accounts-daemon.service
  5. AccountsService will automatically rebuild clean user profile files directly from /etc/passwd and /etc/shadow.

Verify Directory Ownership and Security Permissions

AccountsService strictly refuses to execute if internal directories have permissive permissions:

  1. Ensure that the storage directories are owned by root:root with secure read/write attributes:
    sudo chown -R root:root /var/lib/AccountsService
    sudo chmod 755 /var/lib/AccountsService
    sudo chmod 700 /var/lib/AccountsService/users
  2. Restart the daemon:
    sudo systemctl restart accounts-daemon.service

Reinstall the accountsservice Package via APT

If binary files or systemd unit definitions were damaged during package upgrades, a clean reinstallation restores defaults:

  1. Reinstall the package:
    sudo apt update
    sudo apt install --reinstall accountsservice
  2. Reload the systemd manager configuration:
    sudo systemctl daemon-reload
    sudo systemctl enable --now accounts-daemon.service
  3. Verify that the service transitions to active (running):
    systemctl is-active accounts-daemon
  4. Restart your display manager (e.g. sudo systemctl restart gdm) to restore graphical login screens.

Purging corrupted metadata files and verifying directory permissions ensures that AccountsService launches cleanly, restoring normal desktop logins on Ubuntu.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.