Allow user to execute root files

Follow me on Telegram for more content. Contact me for business opportunities.

Sometimes it's useful allowing users to execute programs reserved for root. For example if we have a desktop system, we can allow users to halt or reboot computer.

There are several ways to achieve it, the proposed here is the simplest one (probably not the securest one).

Just add +s to file permissions; for example:
chmod +s /sbin/halt

I don't recommend doing it without reading some documentation, and comparing this method with "sudo"...

Show Comments