'shutdown' and 'cat'
Hi All,
This is actually a good interview question.
On linux, the permissions and group for 'shutdown' and 'cat' is the same.
-rwxr-xr-x 1 root root 18K 2008-05-21 10:43 shutdown
-rwxr-xr-x 1 root root 17K 2007-01-30 19:51 cat
Then why is it that a normal user cannot run the 'shutdown' command ?
I've done some searching and I think it has something to do with SUID.
The 'shutdown' command calls the seteuid(0) where as the 'cat' command does not.
Is this correct ? Could someone please verify? Also is there a list of commands which can only be run by su even though the permissions are the same? I mean how can we know?
Thanks.
Last edited by scottsiddharth; 11-25-2008 at 01:00 AM..
|