In a previous post I wrote about how to use Realmd and SSSD to join Ubuntu 16.04 to active directory. This has been working fine, but I noticed my root mailbox had a bunch of repeated entries with the following:
root : problem with defaults entries ; TTY=pts/2 ; PWD=/root ;
It turns out, every time a user would execute a sudo command, it would send an email to root with the above error. After doing a bit of searching I found the reason. Basically, it’s not really an error, just noise since sssd does not support sudo rules for local users.
It’s an easy fix to stop this. Just edit your /etc/nsswitch.conf file. Find this line:
sudoers: files sss
and change it to:
In your example, why is the root user running sudo?
I ran into the same issue on some of my hosts during reboots. It looks like one of the services started by systemd uses sudo (as root) to switch users to a user in our FreeIPA domain, and this process was starting before the sssd and nss-user-lookup services were running.
I added the following to the Unit section of the systemd service file and it seems to have resolved the issue for my particular case:
Sorry for the confusion here. Example is just the actual error being printed. It’s not the root user, using sudo. Any regular user executing a sudo command would trigger that . error.