Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 09-01-2010, 07:15 PM   #1
LQ Newbie
Registered: May 2008
Posts: 2

Rep: Reputation: 0
run a shell script as root

I know I can use sudo ./ then enter the root password and the script will run. My question is can I set the permissions on the script so it will run as root when I click on the desktop ICON.
Old 09-01-2010, 07:37 PM   #2
LQ Newbie
Registered: Aug 2010
Location: Chennai, India
Posts: 2

Rep: Reputation: 0
Create the script from root and set the SUID bit (chmod u+s) to enable other users to execute the script with root privileges.

Last edited by HPASUPATHI; 09-01-2010 at 07:39 PM.
Old 09-01-2010, 11:32 PM   #3
LQ Newbie
Registered: May 2008
Posts: 2

Original Poster
Rep: Reputation: 0
I tried your solution and although I have been away from Unix for a number of years I believe it should have worked however still no joy. I must be missing something. Does setting that permissions follow to child processes?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Run shell script as root automatically elempoimen Linux - Software 8 06-20-2010 01:24 AM
How to run a shell script as root (when user is not root) taylorkh Linux - Newbie 10 09-12-2008 06:05 PM
How to run root privileged Linux command as normal user via shell shell tcegrid Linux - Newbie 1 06-23-2008 03:38 PM
allow sudo for www user to run root shell script cccc *BSD 12 07-23-2005 03:48 PM
Need to run shell script as root kaloyer Programming 4 06-27-2004 09:01 AM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:24 PM.

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