LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 12-22-2003, 09:01 PM   #1
slickrcbd
Member
 
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 07:30 AM.
 
Old 12-22-2003, 09:19 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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
 
Old 12-22-2003, 09:49 PM   #3
Demonbane
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, 02:51 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

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

Cool
 
Old 12-24-2003, 07:27 AM   #5
jdruin
Member
 
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?
 
  


Reply



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 05:53 PM
How do I make it so regular users can access an automounted floppy? mugwump84 Linux - Newbie 4 04-02-2005 11:43 PM
giving user access to 'shutdown -r now' or -h commands Lleb_KCir Linux - General 2 03-16-2005 11:50 AM
No access to cdrom or audio with regular users jwn7 Debian 3 09-25-2004 06:45 PM
Giving users access to the system... TCasp77 Slackware 5 02-28-2004 01:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:23 AM.

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