This simple script rotates Unifi controller WIFI passphrases and generates a QR code.
If you have a guest network that you would like to secure by rotating on a daily/weekly/monthly basis. This script is requesting infomation from the user running the script however hard-coded values can be set if it needs to be running in a schedule/cron.
-
A working internet connection
-
A Unifi controller running on your local network and functioning correctly
-
Credentials to access your Unifi controller
-
Python 3 installed
-
Get some friends
-
Git clone repository
git clone https://github.com/chrisreeves-/unifi-passphrase-rotator.git
- Install Python packages
pip install -r requirements.txt
- Gather information about your Unfi controller
- IP Address
- Port (Usually 8443)
- Username
- Password
- The name of the SSID
- Run the script
python3 rotator.py
- Enter information from step 2
This script is utilising wifi-qrcode-generator referenced here: https://pypi.org/project/wifi-qrcode-generator/
This doesn't work if your Ubiquity account has 2FA enabled.