From "Do we need to reboot after adding an user to sudoers?", it is apparent that restarting Sudo Service is necessary, or reboot. However the recommended way, which works for Ubuntu 14.04, is no longer working for Ubuntu 18+:
$ sudo service sudo restart
Failed to restart sudo.service: Unit sudo.service is masked.
Solution?
masked
services are when the systemd unit files are linked to/dev/null
/ You can see thesudo.service
Some services are used within systemd, and not actual daemons with processes that run in the background. For example, you cannot start/stop
halt.service
. But if you place your scripts in/usr/lib/systemd/system-shutdown/
, they will be run before the system is halted or rebooted.Sudo Usage
You don't need to reboot to use sudo. Simply add users and your settings to the Sudoers file.
I know it's late but I wanted to give my two cents to newbs like me. I also thought the change wasn't working, it was just silly of me that I thought you didn't need to type
sudo
anymore after the first one for however long timeout insudoers
is set for (default 15 min). In other words you have to keep typingsudo
before any relevant command, it just doesn't ask you for password anymore.