The accounts-daemon service on Ubuntu manages user account metadata, login icons, language preferences, and desktop session profiles via the D-Bus system bus. When system startup stalls with “Failed to start accounts-daemon.service” or the login greeter (GDM/LightDM) hangs on a black screen, corrupted user profile records or broken D-Bus configuration files are typically responsible.
Check Service Status and Systemd Logs
Isolate the specific reason why systemd failed to activate the accounts daemon daemon unit.
- Press Ctrl + Alt + F3 to enter a text-only TTY virtual terminal if the graphical desktop cannot load.
- Log in with your administrative username and password.
- Inspect the accounts service status:
systemctl status accounts-daemon.service - Examine recent journal logs for runtime crash details:
sudo journalctl -u accounts-daemon -b --no-pager
Inspect and Repair Corrupted User Account Metadata
The accounts service stores cached user metadata files inside /var/lib/AccountsService/users/. If a system crash or power outage left a zero-byte or corrupt file in this directory, the daemon crashes on boot.
- Navigate to the metadata storage path:
cd /var/lib/AccountsService/users/ - List directory contents and file sizes:
ls -la - If any username file appears empty (0 bytes) or contains invalid binary fragments, remove or rename it:
sudo mv broken_user broken_user.bak - Restart the service to verify that clean default templates regenerate:
sudo systemctl restart accounts-daemon.service
Reinstall accountsservice Package and Validate D-Bus Policies
Missing D-Bus system bus policy definitions prevent unprivileged daemons from communicating with the system bus.
- Reinstall the core accountsservice package cleanly via APT:
sudo apt update && sudo apt install --reinstall accountsservice - Verify that D-Bus configuration files exist at
/etc/dbus-1/system.d/org.freedesktop.Accounts.conf. - Restart the system display manager to resume standard desktop session login:
sudo systemctl restart gdm3 || sudo systemctl restart lightdm