• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

User to run /etc/rc.shutdown -h

Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
8 Posts 3 Posters 1.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    Crounini
    last edited by Jul 4, 2014, 1:15 PM

    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 !

    1 Reply Last reply Reply Quote 0
    • K
      KOM
      last edited by Jul 4, 2014, 1:26 PM

      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.

      1 Reply Last reply Reply Quote 0
      • C
        Crounini
        last edited by Jul 4, 2014, 1:42 PM

        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…)

        1 Reply Last reply Reply Quote 0
        • K
          KOM
          last edited by Jul 4, 2014, 2:27 PM

          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.

          1 Reply Last reply Reply Quote 0
          • C
            Crounini
            last edited by Jul 4, 2014, 2:44 PM

            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.

            1 Reply Last reply Reply Quote 0
            • C
              Crounini
              last edited by Jul 7, 2014, 7:19 AM

              Hello,

              Can somebody help me ?

              Thank you.

              1 Reply Last reply Reply Quote 0
              • J
                jimp Rebel Alliance Developer Netgate
                last edited by Jul 7, 2014, 7:02 PM

                Install the sudo package and grant the user access to use sudo to run that one command.

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • C
                  Crounini
                  last edited by Jul 8, 2014, 7:52 AM

                  Thank you Jimp

                  1 Reply Last reply Reply Quote 0
                  1 out of 8
                  • First post
                    1/8
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                    This community forum collects and processes your personal information.
                    consent.not_received