Captive Portal Password to Change Weekly Automatically



  • 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



  • 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.



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

    Thanks,
    Sam