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. |
|
 |
12-22-2003, 09:01 PM
|
#1
|
|
Member
Registered: Jan 2003
Posts: 42
Rep:
|
Giving regular users access to certain root-only commands
Is there any way I can give EVERYBODY access to certain root-only commands without giving out the su password?
Specifically, I'd like for people to be able to turn off the computer when their finished with the shutdown -h or the halt command, and I'd like for people to mount CDs, 3.5" floppy, and ZIP disks, which I only know how to do using the mount command. Also the reboot command would be nice to add to the list so people can switch OSes (I have a duel boot and linux is NOT the primary OS for some users). Finally, I'd like for at least one user to be able to use the ifconfig command, or have some other means of finding out what the current IP number of the computer is, since it's allocated via DHCP.
Unfortunetly, all of these tasks require me to be logged in as root (or use the su command), and nobody else can accomplish these tasks except for those with the su password. I am quite inexperienced with Linux/Unix administration and am still learning, so if somebody could please give a detailed explination of the procedure involved in making these commands available to everybody, I'd apreciate it.
Oh, BTW, I'm using Yellow Dog Linux 2.1 on a PowerMac 6500/300. It's basically a PPC version of Red Hat Linux, though I noticed a few differences in my limited experience with Red Hat. I'd use something later, but I can't seem to get later distrubutions to run on that hardware.
Last edited by slickrcbd; 12-23-2003 at 07:30 AM.
|
|
|
|
12-22-2003, 09:19 PM
|
#2
|
|
Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611
Rep:
|
There are going to be a few options for this:
1. Check out the man page for sudo. This is probably going to be the best option, I consider it the "proper" way to do such tasks, and it's also going to be the best documented.
2. Create a group. Now, own these specific tasks to that group. Add your users to this group, and ensure proper permissions for GROUP are given. Finally, you may have to modify your user's PATH variables to include the /sbin directory as that's where quite a few of these "root" commands will be located. Each time you add additional users, be sure to add them to this group (assuming you want them to have the same permissions).
There are others, however these 2 are probably going to be some of your better choices. If you aren't in a hurry, hold out for a few other responses to get a good feel for some ideas to choose from.
Cool
|
|
|
|
12-22-2003, 09:49 PM
|
#3
|
|
Guru
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796
Rep:
|
Also depending on the distro, all these groups might already been setup for you, take a look at /etc/group file.
|
|
|
|
12-24-2003, 02:51 AM
|
#4
|
|
Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,611
Rep:
|
Good point!  On a few distros, they have chosen the group "wheel" for these functions.
Cool
|
|
|
|
12-24-2003, 07:27 AM
|
#5
|
|
Member
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313
Rep:
|
Doesnt the group "wheel" give sudoers total control and not just limit them to certain commands? or is there something else you do to prevent this?
|
|
|
|
| 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 06:08 PM.
|
|
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
|
|