The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shutdown aewpcoles UNIX for Advanced & Expert Users 6 08-03-2006 10:46 AM
using 'cat' to in 'while read line' chugger06 UNIX for Dummies Questions & Answers 3 01-18-2006 02:40 PM
SCO 5.06 :automatic shutdown on the job? rendechen SCO 1 01-06-2005 06:05 PM
non root shutdown???? byblyk Linux 4 07-26-2004 03:01 AM
to shutdown rajashekaran UNIX for Advanced & Expert Users 2 02-18-2002 01:42 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-25-2008
scottsiddharth scottsiddharth is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 5
Red face '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..
 

Bookmarks

Tags
linux commands

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:38 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0