[CentOS] Allowing non-root users to reboot a workstation
Valeri Galtsev
galtsev at kicp.uchicago.edu
Fri Feb 2 16:47:50 UTC 2018
On 02/02/18 10:09, Felipe Westfields wrote:
> I would like to be able to allow regular users that don't have admin
> privileges to be able to reboot their workstation. (they're software
> developers so rebooting their workstation doesn't affect anybody else)
>
> I tried changing the ownership of /sbin/reboot and /sbin/shutdown to
> root:users and permissions to 550, but that didn't work - it's still asking
> for root privileges.
>
> Possibly the problem might be that there's centralized LDAP authentication,
> not local, so the changes I made only apply to local accounts?
>
> Any suggestions?
If they are local users (sitting in front of that computer), they will
be able to use the commands
shutdown
reboot
poweroff
without any need of special privileges, which tells RedHat and CentOS
apart from majority of Linuxes. This is incredibly logical (Thanks,
RedHat!), as local user can just press power button, or yank AC cord.
To allow remote users reboot machine you can allow them execute some
commands via sudo , like:
sudo reboot
Command sudo means Substitute User DO; when username of substitute user
is not mentioned in command user "root: is used as substitute user, this
is where misinterpreting the command as "super user do" originates, and
the last is wrong. Do "man visudo", "man sudo", to learn details.
Incidentally, rebooting machine is rather big deal, if that is used to
resolve some trouble happening every so often, I would rather look into
fixing the cause of that trouble.
Valeri
>
> FW
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos
>
--
++++++++++++++++++++++++++++++++++++++++
Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247
++++++++++++++++++++++++++++++++++++++++
More information about the CentOS
mailing list