User to run /etc/rc.shutdown -h
-
Hi All !
I'm pfSense fan !
Can anybody tell me if a simple user, created with uid >=2000 and 65534 (nobody) gid can run /etc/rc.shutdown -h command to halt psSence.
It's pretty sure that he cannot I think…
So, another question; I want to shutdown properly my router in case of power failure and I must do it with a "simple" user via SSH. How can I do that ?
-Put the user in wheels group ?
-Install sudo ? (I prefer not do that and let my pfSense as clean as possible...)
-It's not possible and I must use the root user...Thank you for your help !
-
You could use User Manager to create a Group that has the "WebCfg - Diagnostics - Halt System page" permission, and then add your user to that group. Then he can login to the WebGUI and use the menu to shut down the system.
-
Hello KOM,
Thank you for your reply.
Your solution is interesting but, I think it is only to let an human to shutdown the system by the WebGUI.
In my case, I want to create an automatic shutdown by an SSH process through the network (my router will be shutdown by the command "ssh root@pfsense /etc/shutdown -h" from another machine…)
-
Ah, I didn't know that you were trying to automate it. I'm not a Linux shell guru, and I don't know how you would get past the login menu that pfsense throws at you. After login, you still have to select '8' to get to the shell.
-
Yes, if you are logging in an interactive shell…
But if you send a command by SSH, you are not in an interactive Shell.
Thank you again.
-
Hello,
Can somebody help me ?
Thank you.
-
Install the sudo package and grant the user access to use sudo to run that one command.
-
Thank you Jimp