Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-22-2003, 10:01 PM   #1
Registered: Jan 2003
Posts: 45

Rep: Reputation: 1
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 08:30 AM.
Old 12-22-2003, 10:19 PM   #2
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
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.

Old 12-22-2003, 10:49 PM   #3
LQ Guru
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Also depending on the distro, all these groups might already been setup for you, take a look at /etc/group file.
Old 12-24-2003, 03:51 AM   #4
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
Good point! On a few distros, they have chosen the group "wheel" for these functions.

Old 12-24-2003, 08:27 AM   #5
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Rep: Reputation: 30
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
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
Giving a user (not a root) an access to some system commands asschay Linux - Newbie 8 09-08-2005 06:53 PM
How do I make it so regular users can access an automounted floppy? mugwump84 Linux - Newbie 4 04-03-2005 12:43 AM
giving user access to 'shutdown -r now' or -h commands Lleb_KCir Linux - General 2 03-16-2005 12:50 PM
No access to cdrom or audio with regular users jwn7 Debian 3 09-25-2004 07:45 PM
Giving users access to the system... TCasp77 Slackware 5 02-28-2004 02:18 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:54 AM.

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