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

Possible to change password through SSH?

Scheduled Pinned Locked Moved General pfSense Questions
3 Posts 3 Posters 627 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.
  • E
    eric.mak
    last edited by Jul 29, 2021, 3:44 AM

    Hi guys,

    I want to know is it possible to change web gui login password through simple SSH command like "passwd"?

    My organization wants to use password management software to control the passwords of the whole infrastructure and that required able to access the device through remote access and support using command to change the password.

    The idea is we have to apply through the software to retrieve the password & the password will change after each use by the software.

    I tried to search but seems pfsense does not support such function, so is it impossible to do so or have some work around can achieve the goal?

    Thanks in advance.

    G 1 Reply Last reply Jul 29, 2021, 8:48 AM Reply Quote 0
    • G
      Gertjan @eric.mak
      last edited by Jul 29, 2021, 8:48 AM

      @eric-mak

      Noop.
      A default 'FreeBSD' would permit the change of a password like that.
      But, pfSense is not FreeBSD, it's is based on FreeBSD, and has a GUI for all the maintenance.

      Take note : the SSH should be used only ones with a 'user' (admin) and a password.
      After that, you create a certificate, and use it with the SSH client. You can now chose not to use the password any more.

      bcd18517-a172-4af8-a731-ac07506ce7e2-image.png

      and :

      cfde184d-44c5-4605-a706-5c121c9f9ba9-image.png

      I'm using the admin password only for the GUI access - and this access only works on a "LAN" physically accesible to me.

      @eric-mak said in Possible to change password through SSH?:

      The idea is we have to apply through the software to retrieve the password & the password will change after each use by the software.

      That's a bit strict.
      As said above, access pfSense on a reserved LAN.
      And use certs when accessing SSH - if you want pfSense to be accessible from the outside, use a VP connection.

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      1 Reply Last reply Reply Quote 0
      • J
        jimp Rebel Alliance Developer Netgate
        last edited by Jul 29, 2021, 2:11 PM

        You can:

        pfSsh.php playback changepassword <username>
        

        Though I'm not sure it would be easy to automate that since it expects user input for the password. We don't allow entering the password in the command line parameters in that script since it's not secure.

        You could look at /etc/phpshellsessions/changepassword and make your own copy that does what you want in a more script-friendly way.

        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 1
        2 out of 3
        • First post
          2/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received