Answer the question
In order to leave comments, you need to log in
Centos - why don't sudo rules for localhost work?
Greetings!
Because of what could this be?
the following rules do not work:
%groupname localhost=/sbin/shutdown -r now
, but the following rules work:
%groupname fullhostname=/sbin/shutdown -r now
fullhostname - machine name from /etc/hostname
At the same time, localhost is pinged.
OS - Centos 7.
Answer the question
In order to leave comments, you need to log in
From "man sudo":
Those. you need to write not "localhost", but what the "hostname" command says.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question