Tuesday, April 17, 2007

Allow user to execute root files

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"...

1 comment: