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

    Query pfSense user expiration date on command line?

    Scheduled Pinned Locked Moved General pfSense Questions
    2 Posts 2 Posters 519 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.
    • B
      bubble1975
      last edited by

      Hey Y'all,

      We are using the local pfSense user database to manage OpenVPN users. We have set expiration dates for each user, such that their account will auto-disable when the expiration date comes.

      Is there any way, from a shell on the pfSense box, to query the expiration date of all the users at once? I'm looking to write a little script that queries the expiration dates of the users but I don't know what command would get me that data from a shell prompt...?

      Thanks for any hints! We are running 2.4.3-RELEASE-p1.

      cheers,
      erich

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        There is no command that will query the local database users in that way, you'd have to write your own script.

        You could use the changepassword script as a starting point. It is in /etc/phpshellsessions/ and you run it from ssh or console shell with pfSsh.php playback changepassword for example.

        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
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.