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

    Massive change users exp.date

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 351 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.
    • nnicola82N
      nnicola82
      last edited by

      Hi guys
      I have about 200 users who have a common expiration date (of the account, not of the associated certificate)
      that I would like to extend without recreating the user: exist the possibility to do it from script / cli?
      I was thinking of a backup of the 'system' only and changing the 'expires' field in the xml and its restore but it is a procedure that I have never done and it is the second thing that came to my mind after a possible script from cli (if feasible)

      thanks for the support

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        You certainly could do it by editing the users in the config and restoring that section. It is, of course, very easy to typo something there rendering the config invalid so be sure to have a full back of the working config and a plan to restore it if you choose to do that.

        Steve

        1 Reply Last reply Reply Quote 0
        • nnicola82N
          nnicola82
          last edited by

          if there are no other alternatives to edit xml file exported, e.g. with 'sed' command directly from the console, I can try only this way

          best regards, thanks!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.