Allow any user to use shutdown with my own shell
First of all sorry if my english is not excelent but it isnt my native language.
I have a project where I'm building my own shell (named MYSHELL). One of the tasks is to create my own built-in turnitoff, a command that can be executed by any user that has MYSHELL as default shell *. The problem is that this command is only for the sudo.
I read that I can edit the sudoers file BUT there is a problem with this:
Lets say that John has MYSHELL installed. He can change to his previous shell whenever he wants (for example bash). When he is in bash he is not supossed to run shutdown, but he will.
Hope I made my self clear....
I dont want the answer, just a helping hand that can tell my were I can search...
Thanx a lot in advance!
*The user that has MYSHELL as shell is because someone installed it with a makefile. At this point is when we can change everything becase the makefile is run with the root user.