Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

How to disable some shell commands foe a specific user?


ghost's Avatar
0 0

Let's say that I don't want to run from a 'guest' account command 'powerof' or 'reboot'

Is there any way how to deny to a specific user specific commands?

Thanks.


shadowls's Avatar
You Like this!
90 0

you mean like a c99 shell?


ghost's Avatar
0 0

shadowls wrote: you mean like a c99 shell?

Lol.


ghost's Avatar
0 0

moshbat wrote: More info, if you will.

Yeah like OS for one.


ghost's Avatar
0 0

moshbat wrote: what shell, for another.

I believe when he uses the term 'shell' he means a command terminal. I could be completely wrong tho..:whoa::right:


shadowls's Avatar
You Like this!
90 0

he did not give enough info for any of us to help him.


ghost's Avatar
0 0

shadowls wrote: he did not give enough info for any of us to help him.

I know. We really need an OS to definitively tell him, most OS' have different command terminals, and ways to prevent/block access to them.


ghost's Avatar
0 0

moshbat wrote: @slpctrl; There are different shells. I have several that I used to use at school.

Yeah. Well in my experience, there's a shell that runs through the operating system. Then you can use a shell emulator to pass commands through it. Were you using a shell emulator? (Coded 3rd party)?


ghost's Avatar
0 0

slpctrl wrote: [quote]shadowls wrote: he did not give enough info for any of us to help him.

I know. We really need an OS to definitively tell him, most OS' have different command terminals, and ways to prevent/block access to them.[/quote]

I believe he is using Fedora Core 8

Can't you do something like:

  • make the users that you want to access the command to be part of the file's group.
  • Then you find where the file is stored and chmod it.
  • eg: chmod -c 010 /usr/bin/reboot

ghost's Avatar
0 0

Yes. I'm using Fedora 8. I've tryed your solution, but then I cannot completely run that command, only from root's account.

I'm using 'Terminal' under GNOME.