Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-14-2009, 06:27 AM
|
#1
|
|
LQ Newbie
Registered: Oct 2009
Posts: 6
Rep:
|
How to allow access to some commands having root privleges to be run bu non root user
Hi
I am new to unix/linux and i have a mjor assignment. i have to find ways to run particular commands which can be run only by root from a non root user. I know sudo is one of the way but i need some diffrent approach.
Please help..
Regards
shikika
|
|
|
|
10-14-2009, 06:29 AM
|
#2
|
|
Senior Member
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,592
Rep: 
|
What different approach? What is your main goal? sudo is the best possible way for it. Another way is to add users to root group and add permissions on the command for the group. But this is not definitely the best way and sudo is something you should be looking at.
|
|
|
|
10-14-2009, 07:07 PM
|
#3
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 14,988
|
Concur with linuxlover.chaitanya; explain why sudo is insufficient. Its exactly the situation sudo was designed for.
|
|
|
|
10-14-2009, 07:22 PM
|
#4
|
|
Member
Registered: Sep 2009
Distribution: Fedora
Posts: 835
Rep: 
|
Quote:
Originally Posted by suryashikha
Hi
I am new to unix/linux and i have a mjor assignment. i have to find ways to run particular commands which can be run only by root from a non root user. I know sudo is one of the way but i need some diffrent approach.
Please help..
Regards
shikika
|
Is this homework? Have you read the man page for setuid? This is an example where, if it's homework, go ahead and read about setuid, but if this is practice, don't do it unless you are very knowledgeable and a bit reckless.
|
|
|
|
10-14-2009, 07:28 PM
|
#5
|
|
LQ Veteran
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642
Rep:
|
Agreed..... why do you reject sudo? Its purpose is to do exactly what you describe
|
|
|
|
10-30-2009, 10:23 AM
|
#6
|
|
LQ Newbie
Registered: Oct 2009
Posts: 6
Original Poster
Rep:
|
No its not a homework. Installing of sudo is not allowed tats y i have to cum up with diffrent approach.
|
|
|
|
10-30-2009, 01:34 PM
|
#7
|
|
Guru
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,002
|
If it's "not allowed", then perhaps you should ask the owner / administrator of the system to help you.
Have you read the LQ Rules ?
|
|
|
|
10-31-2009, 01:33 AM
|
#8
|
|
Senior Member
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,592
Rep: 
|
Quote:
Originally Posted by suryashikha
No its not a homework. Installing of sudo is not allowed tats y i have to cum up with diffrent approach.
|
What distribution are you using? sudo is most probably installed by default on most of the distros.
But yes, administrator can restrict its usage to limited users of his/her choice. And if you are not one of them, use the system he wants you to use. No member here will help you if you are hacking into his system.
|
|
|
|
10-31-2009, 01:05 PM
|
#9
|
|
LQ Newbie
Registered: Oct 2009
Posts: 6
Original Poster
Rep:
|
I think i gave the wrong idea. I have to come up with a solution to run some commands which require root privleges when sudo is not installed/ or cannot be installed. I think setuid is the only method and i have implemented a soultion with it. Thanks for helping.
|
|
|
|
| Thread Tools |
Search 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
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:17 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|