Skip to content

Some scripts to change a wifis PSK on OpenWrt ,e.g. every night, and to display the random password via CGI.

License

Notifications You must be signed in to change notification settings

mm28ajos/OpenWRTGuestWifiPasswordChanger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OpenWRTGuestWifiPasswordChanger

Some scripts to change a wifi's, e.g. guest wifi, password aka PSK on OpenWrt via uci, e.g. every night, and to display the random password via CGI in browser with QR-Code.

Dependencies

Install 'qrencode' package.

opkg update
opkg install qrencode

Copy Files

Move change script of wifi e.g. to /root. Move CGI script to /www/cgi-bin/

mv scripts/ChangeGuestWifiPW.sh /root
mv cgi/guestpw /www/cgi-bin/

make file executable

sudo chmod +x /www/cgi-bin/guestpw

Create Folder for Resources (QR-Code)

mkdir /www/general-cgi-resources

Add Cronjob

For example, add a cronjob changing the PSK every night at 4 a.m.

0 4 * * * sh /root/ChangeGuestWifiPW.sh >/dev/null 2>&1

Start and Enable Cron

/etc/init.d/cron start
/etc/init.d/cron enable

Finally, modify the id and ssid of your guest wifi in the ChangeGuestWifiPW.sh script and access your guest PSK page by http(s)://xxx.xxx.xxx.xxx/cgi-bin/guestpw

About

Some scripts to change a wifis PSK on OpenWrt ,e.g. every night, and to display the random password via CGI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages