LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-17-2003, 06:24 AM   #1
porous
Member
 
Registered: Oct 2003
Distribution: redhat 9
Posts: 147

Rep: Reputation: 15
execute as root ?


how do you make a program which requires root previlages to be run by other users ...
i read it sometime back that you can change the permission of a binary file so that even when other users run it it will execute as root....

can any one help me .....

i think the ls -l for that looks something like

srwxr-xr-x < file name >

s-----> run as root ...

(from my memory , so i am not that sure )....

can someone help me .....


thx
 
Old 10-17-2003, 07:31 AM   #2
iainr
Member
 
Registered: Nov 2002
Location: England
Distribution: Ubuntu 9.04
Posts: 631

Rep: Reputation: 30
You're thinking of SUID - Set UID where a file is owned by one user (e.g. root), has the SUID bit set and then when anyone executes it, it executes with root authority.

It looks like this
-rxsr-xr-x filename

You set it with chmod u+x <filename>

Note that you can set whole filesystems to not run suid binaries, so if it doesn't work, check /etc/fstab for nosuid.

Iain.
 
Old 10-17-2003, 08:54 AM   #3
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
That would be "u+s" to set the UID bit.
 
Old 10-17-2003, 10:31 AM   #4
iainr
Member
 
Registered: Nov 2002
Location: England
Distribution: Ubuntu 9.04
Posts: 631

Rep: Reputation: 30
Quote:
Originally posted by stickman
That would be "u+s" to set the UID bit.
Sorry - my typo.
 
Old 10-18-2003, 04:54 AM   #5
porous
Member
 
Registered: Oct 2003
Distribution: redhat 9
Posts: 147

Original Poster
Rep: Reputation: 15
thx guys ...

i got it....
 
Old 10-18-2003, 05:30 AM   #6
porous
Member
 
Registered: Oct 2003
Distribution: redhat 9
Posts: 147

Original Poster
Rep: Reputation: 15
one more thing , is there any security issuse , in addin a user to the roots group and setting the permission as

-rwsr-x-- < file name >

so that only the user i add to roots group will have the permission...

another one is this .................

if i change the group for a program which initially belonged to the roots group (not the owner ) , will there be any confilits ...
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Execute shortcut as Root Command? batorma Linux - Newbie 2 11-08-2005 02:22 PM
all users but root cannot execute even when they have premissions jbabcock Linux - Security 4 11-02-2005 03:38 PM
execute as root tidasu Linux - Newbie 4 08-27-2004 05:25 PM
Root can execute programs lawrencegoodman Linux - Newbie 11 01-28-2004 07:42 AM
execute from root raysr Linux - Newbie 3 12-09-2003 01:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration