During the Ubuntu boot sequence or when reviewing system logs via journalctl, administrators may encounter the startup failure: Failed to start Accounts Service, often accompanied by degraded system status reported by systemctl is-system-running. The Accounts Service (accounts-daemon.service) provides a D-Bus interface for querying and manipulating user account information, desktop login profiles, and user avatars under GNOME and systemd.
Why Does the Accounts Service Fail to Start?
The accounts-daemon binary communicates across the system D-Bus message bus and reads user metadata from /var/lib/AccountsService/. Root causes for daemon startup failures include:
- Corrupted User Metadata Files: Malformed or truncated user state files inside
/var/lib/AccountsService/users/cause the daemon parser to crash on initialization. - Incorrect Directory Permissions: Strict or misconfigured ownership on
/var/lib/AccountsServiceprevents the daemon process from reading or updating account states. - D-Bus System Bus Stalls: The system message bus (
dbus.service) failing to acknowledge or route daemon registration calls during early boot targets. - Broken Package Upgrades: Interrupted
apttransactions resulting in mismatched library dependencies or missing binary components. - File System Read-Only Lockouts: Disk volume errors causing Ubuntu to mount root partitions as read-only, preventing accounts-daemon state writing.
Method 1: Inspect Systemd Journal Logs for Detailed Errors
Querying the journal for the accounts daemon reveals the exact file or system call responsible for the startup failure.
- Open a terminal session or drop into a root recovery shell.
- Examine the unit status:
sudo systemctl status accounts-daemon.service - Query the system journal logs specifically for the service:
sudo journalctl -u accounts-daemon.service -b --no-pager - Look for log entries indicating parsing failures, corrupted user files, or D-Bus access denied errors.
Method 2: Fix Directory Ownership and Permissions
AccountsService requires standard root ownership and specific directory permissions to function securely.
- Verify and restore ownership of the AccountsService storage directory:
sudo chown -R root:root /var/lib/AccountsService - Set directory permissions to standard secure parameters:
sudo chmod 755 /var/lib/AccountsService sudo chmod 700 /var/lib/AccountsService/users - Attempt to restart the accounts daemon:
sudo systemctl restart accounts-daemon.service - Verify that the service transitions into an active (running) state without errors.
Method 3: Remove Corrupted User Cache Files
If a specific user file inside AccountsService was corrupted during an unclean shutdown or power failure, purging the cached configuration allows the daemon to regenerate state.
- Navigate to the users directory:
cd /var/lib/AccountsService/users - List the contents to identify existing files:
ls -la - Create a backup of current user records:
sudo mkdir /tmp/accounts-backup && sudo cp * /tmp/accounts-backup/ - Check if any files have 0 bytes or contain binary garbage. Remove the corrupted user file:
sudo rm /var/lib/AccountsService/users/username - Restart the service:
sudo systemctl restart accounts-daemon.service
Method 4: Reinstall the AccountsService Package
Reinstalling the package replaces damaged systemd unit files, D-Bus policies, and binary dependencies.
- Reinstall the
accountsservicepackage usingapt:sudo apt update && sudo apt install --reinstall accountsservice -y - Reload the systemd manager configuration:
sudo systemctl daemon-reload - Enable and start the service:
sudo systemctl enable --now accounts-daemon.service - Check the system running status to verify clean system-wide health:
systemctl is-system-running