Bounty For Pfsense Captive Portal auto password generator. 50$-100$



  • Hey guys need a package or something to setup a hotspot system that changes the password on a set day of the week and emails the passcode to a email.

    Please I need this done asap

    Thanks,
    Sam



  • Do you still need this feature?



  • @stelecom:

    Hey guys need a package or something to setup a hotspot system that changes the password on a set day of the week and emails the passcode to a email.

    Hey,

    i use the following:

    userspassword="`/usr/bin/openssl rand -base64 1024 | /usr/bin/tr -dc A-Za-z0-9 | /usr/bin/head -c 8 | /usr/bin/xargs`"
    

    The Variable (userspassword) could be used to mail the info to your endusers. I use this in some shell scripts to generate and reset passwords. The new password is sent via Test Message (SMS) and Mail to the endusers.

    There is a much easier way to do it by use urandom! But i figure out, that sometimes the TR hangs on pfSense (Most of the time on amd64 systems, that I use a lot). The more complex way above seems to run well on all tested i386 an amd64 installations ;-)

    BTW: You might want to change the head -c 8 to whatever you like :-) I like to set passwords with 8 std. chars. A friend ask me to change it to someting like this:

    userspassword="`/usr/bin/openssl rand -base64 1024 | /usr/bin/tr -dc a-z1-9 | /usr/bin/head -c 4 | /usr/bin/xargs`"
    

    Just 4 Chars (lowercase) and no 0. I never asked why ;-)

    Ciao
    /JH



  • is there any way to do this i need to do this for a mass setup?

    Like a step by step guide sorry still a newbie at pfsense,



  • @stelecom:

    is there any way to do this i need to do this for a mass setup?

    Like a step by step guide sorry still a newbie at pfsense,

    Yes!
    You can Bulk import the users to your Radius and/or Portal User Base.

    If you use a radius server (eg. FreeRadius) with DBMS (eg. MySQL) you can import them directly to your database.
    Another way could be:
    Import the User via WGET/CURL from a List of attributes.

    it's like type them all in via the web interface, but it's automated.

    I did that a while ago, but it is a lot of work to do it via WGET/CURL! For one major reason: Performance and Error handling.