Navigation

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

    Captive Portal Password to Change Weekly Automatically

    Captive Portal
    3
    3
    1512
    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.
    • S
      sdtelecom last edited by

      Hey guys new to the pf sense forum.

      I was needing some help on making the captive portal password to change automatically every Sunday night.

      Any suggestions?

      Thanks

      1 Reply Last reply Reply Quote 0
      • R
        rick1 last edited by

        Hey,

        you can create a cronjob that calls s/th like this

        #!/usr/local/bin/php -f

        require_once("config.inc");
        require_once("auth.inc");

        $user =& getUserEntry("usernamefrompfsense");
        $pass =password
        local_user_set_password($user,$pass);
        write_config("Guest password changed");

        ?>

        This sets the password for "usernamefrompfsense" every morning to "password".
        You can create a hash from a date string to create nice new passwords.

        1 Reply Last reply Reply Quote 0
        • S
          stelecom last edited by

          Hey can you set a script or something I can pay you Im new to pfsense and getting used too everything.

          Thanks,
          Sam

          1 Reply Last reply Reply Quote 0
          • First post
            Last post