LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ordinary user can execute the "halt" command (http://www.linuxquestions.org/questions/linux-newbie-8/ordinary-user-can-execute-the-halt-command-2722/)

ederts 05-23-2001 05:39 AM

Hi! I'm a newbie on linux and I've been studying this new OS for almost two weeks now. I know there are still more things to learn. I already did my best to look for an answer to my question but finally, I decided to post it here.

So this is my case. I execute the command "useradd ederts" in the root account. And I put password on the username ederts by executing the command "passwd ederts" on the root account.

My question is, when I execute the command "halt" in the ederts account it was able to halt the system. I thought this can only be done by a root account.

I'm using my own computer in studying this OS and am using Redhat 7.1.

Now back to my question. How can I make it a point that only the root can halt my system? It's pretty scary even ordinary users like "ederts" can halt the system.

Waiting for your answers and thank God I was able to find this forum on the Internet. Seems having a thick book is not enough to answer all my questions.

Cheers,
ederts

drjimstuckinwin 05-23-2001 06:48 AM

Hi
If you look in LinuxConfig, you should see a tab for editing user accounts. Can't check exactly as I'm at work, so no RH system. If you click on the account name, a separate menu should appear with the priveliges, and you can enable/disable as you wish. Click on activate changes, and your problem should have gone away.
There's probably a way to do it from the command line, but I don't know it.
Jim

trickykid 05-23-2001 06:50 AM

As far as I know most were by default to not be able to halt or shutdown the system. I am unsure of RedHat 7.1 if they have changed that or what.
You should be able to manually change that with permission levels.
Looks as if drjim there beat me to it. :)

[Edited by trickykid on 05-23-2001 at 07:53 AM]

ederts 05-23-2001 09:58 AM

Hi Drjim and Trickykid,

Thanks for the immediate response to my email. I was thinking (while waiting to get home) if that can be solved by changing the permission of the "halt" and "shutdown" file under the sbin/? Do you think it's better to do it in the LinuxConfig? Just thinking if there's a window in the LinuxConfig that I can permit a particular user what files he can execute in the linux system.

Doing it in the console mode or in the shell is kinda tricky for I might miss some files to limit the permission with the other ordinary users.

I'll try your suggestion when I get home. Thanks again. =)

Cheers,

Ederts

trickykid 05-23-2001 11:57 AM

Oh, to tell you now, I think drjim meant Linuxconf, I have never heard of Linuxconfig. I just now caught that too.

prowzen 05-23-2001 02:03 PM

use linuxconf
 
Use linuxconf. I used it for creating user and user groups during my oracle installation. There were options to specify if the user has permission to restart the machine and a few other options too.
Initially I too tried the groupadd, useradd commands but I found linuxconf to be a very convenient tool. Hope this helps.

ederts 05-24-2001 05:11 AM

Hi prozen and others!

About linuxconf I came across a site that explains that in Redhat 7.1 it is not installed by default.

The site is: http://www.solucorp.qc.ca/linuxconf/

Linuxconf is missing in Redhat 7.1


Cheers,

Ederts

prowzen 05-24-2001 11:18 AM

Oh I forgot to mention that! The first time I was looking all over for linuxconf before I realised that it's an add-on. It was in the installation CD and I was able to install it.


All times are GMT -5. The time now is 12:00 PM.