Command run with admin privileges | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


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 !!

Command run with admin privileges

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-14-2013
mastansaheb mastansaheb is offline
Registered User
 
Join Date: Jun 2011
Last Activity: 3 March 2014, 1:03 PM EST
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Command run with admin privileges

Hi all,
I want to run a single command (gdm-restart) which has admin privileges as normal user.
I have done these below steps so for.

1. cp -p /usr/sbin/gdm-restart /usr/bin
2. chmod o+w /usr/bin
3. chown user /usr/bin.

But still not success. So kindly please let me know whether there is any procedure for my requirement.

Regards,
Mastan
Sponsored Links
    #2  
Old 06-14-2013
Scott's Avatar
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 30 August 2014, 3:10 AM EDT
Location: Zürich
Posts: 8,473
Thanks: 330
Thanked 1,046 Times in 913 Posts
sudo would be the normal approach to running a program as super user.

Changing the ownership and giving write privilege to everyone for /usr/bin seems super crazy too.

And as this has nothing to do with Red Hat, I've moved the thread to another forum.
Sponsored Links
    #3  
Old 06-14-2013
mastansaheb mastansaheb is offline
Registered User
 
Join Date: Jun 2011
Last Activity: 3 March 2014, 1:03 PM EST
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Scott,

Thanks for your prompt reply. I know about how to run a command as normal user with administrator privileges using sudo. But my intention is run a single command which is having admin privileges as normal user. Is it possible ?
    #4  
Old 06-14-2013
Scott's Avatar
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 30 August 2014, 3:10 AM EDT
Location: Zürich
Posts: 8,473
Thanks: 330
Thanked 1,046 Times in 913 Posts
Have a look at setuid

setuid - Wikipedia, the free encyclopedia
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script for telnet and run one command kill it and run another command using while loop sooda Shell Programming and Scripting 5 01-10-2013 09:47 PM
Lost Domain Admin Privileges in Samba stringman Windows & DOS: Issues & Discussions 0 02-11-2011 01:35 PM
Change the privileges needed to run a program gaisselick87 Debian 13 11-25-2010 01:18 PM
Admin privileges check gliesian Shell Programming and Scripting 6 03-27-2008 11:30 AM
Lp admin command frustrated1 Solaris 1 06-15-2004 04:22 AM



All times are GMT -4. The time now is 04:12 AM.