Automating Restart of SSSD Service on Ubuntu

Recently, I found myself in a situation where the SSSD service on my Ubuntu server crashed. This was kind of an issue because it meant that all authentication requests were denied. It took a call from an upset dev to figure out what the problem was and then I needed to login and manually restart the service. To prevent this from happening again, I decided to automate the process with a systemd unit file.

Steps to Automate restart of SSSD service on Ubuntu:

Create a new file:


Add the following to the file:

Description=System Security Services Daemon
# SSSD must be running before we permit user sessions
Before=systemd-user-sessions.service autofs.service

ExecStart=/usr/sbin/sssd -i -f


sudo systemctl | grep -i "sssd*"

Save and close the file. Reload your systemd daemon to apply this new configuration: sudo systemctl daemon-reload

sudo systemctl start sssd.service

That's it your are done. Happy automating.

Leave a comment

Your email address will not be published. Required fields are marked *