0

I have already edited /etc/sudoers as described in this topic:

Poweroff or Reboot as normal User

...to allow one specific user to reboot/shutdown via terminal without needing root password, but the user is still prompted for a password when attempting to reboot/shutdown via the menu in the GUI.

What else needs to be edited/modified to allow this?

[root@**redacted** ~]# grep -v '^#' /etc/sudoers

Defaults   !visiblepw

Defaults    always_set_home

Defaults    env_reset
Defaults    env_keep =  "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR 
LS_COLORS"
Defaults    env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE"
Defaults    env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES"
Defaults    env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE"
Defaults    env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY"

Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin

root    ALL=(ALL)       ALL

%wheel  ALL=(ALL)       ALL

ecouser ALL=NOPASSWD: /sbin/shutdown, /sbin/reboot, /sbin/poweroff

Defaults:ALL timestamp_timeout=5

%eco-linuxadmins ALL=(ALL) ALL
%eco-ent-temp-all-sudoer ALL=(ALL) ALL
eco-svc-nessus ALL=(ALL) ALL
%eco-it-access ALL = /bin/ping
%eco-it-access ALL = /bin/ping6
%eco-it-access ALL = /usr/bin/updatedb
%eco-it-access ALL = /bin/kill
%eco-it-access ALL = /usr/bin/killall
%eco-it-access ALL = /usr/bin/pkill
%eco-it-access ALL = /sbin/service
%eco-it-access ALL = /bin/cat
%eco-it-access ALL = /bin/zcat
%eco-it-access ALL = /bin/ls
%eco-it-access ALL = /bin/grep
%eco-it-access ALL = /usr/bin/tail
%eco-it-access ALL = NOEXEC: /bin/find
%wheel  ALL=(root) NOPASSWD: /sbin/shutdown -h now
ecouser ALL=NOPASSWD: /bin/mount, /bin/umount, /sbin/mount.cifs
AA27CXP
  • 1
  • 2

0 Answers0