How to make a Customize Pfsense Update Password for captive portal users?
-
Re: How to allow captive poral users to change their own passwords?
Im looking for this kind of function in my captive portal, allowing captive portal user to change their own password? and it works by using local database and granting captive portal users (or group) the "WebCfg - System: User Password Manager: Privilage, and im working with costumize captive portal landing page with change password button and linking the button to my pfsence gateway inorder them to login and change password but the change password is more likely the pfsence GUI anyone who can tell me if possible to create customize Update password for my pfsence?
-
Your customizing, right ?
Use https://pfsense.yourlan.tld/system_usermanager.php as an example.
Normally, when you use a page like "https://pfsense.yourlan.tld/system_usermanager.php" you should be logged in.
But, as you create your won "user edit" page, you could throw away that need. Just borrow (copy) the code you need to update the user's settings - the 'saving part is happening after the line that says :if ($_POST['save'] && !$read_only) {
Something like : have to look up the user ID first, and if it exists, compare the old password with what the user entered (first "old" password box) and if there is a match, update the user's password with what he entered in the "new" password second box.
This way, you allow only known users to change their own password.