What's new

Setting a random password for guest wifi

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

The Router is set in AP Mode, however, it was behaving the same way in Wireless Router mode...


There is one other thing regarding the email received from the script, not certain if this may point to a source of the issue: The email received seems to have a formatting issue, it appears as such:


Wifi Password: Chocolate
720

Any reason why the number portion of the password is on another line in the email?

Perhaps there is an unwanted character within the script...

The password does show correctly in the webpage... but maybe there is a character [br or return] that is removed when saving the Guest Network settings that may show up from the script...

Can i send to you the script as I have it... will remove credentials before sending...
 
I won't get chance to look at it for a couple of days; sounds like issue is with concatenation of random number so look at that code for spurious characters...
 
I won't get chance to look at it for a couple of days; sounds like issue is with concatenation of random number so look at that code for spurious characters...

All has been resolved redvers, the issue was with the password text file, which, I had created within UltraEdit and assumed [yes, i know] that is was properly formatted.

I had verified that all EOL did not have spaces and there was no hard return at the EOF.

The suspicion was with the way the email transmitted the new password as such:


Wifi Password: Platinum
997

The random number appeared on the next line. However, when I reviewed the Guest WiFi panel, the password appeared correctly on one line, of course. It was only after Saving Settings that the new Guest WiFi password would "Stick".

So... what I did was from within WinSCP is to copy the text file contents, delete the password file, create a new one, then paste the list back... and... Voila!!! Works perfectly.

Just an FYI if anyone else does see the emailed password showing as above... probably a hidden character in the password file or malformed file type...

Thank you all for all your help with this... Much appreciation!!!
 
After a year I made a bugfix of my version of the original by redvers (more info see installation.txt in .rar file):

Extra features compared to "redvers" version:
-simple website to read/set the wifi password and remaining lifetime
-authentication between webserver and router is by using SSH with plain password (connection settings see ssh.php)
-automatic decreasing lifetime of used password
-non-used password will last forever until viewed by the webpage
-on the Router > System Log > General Log you can see important "guestwifi" events

Initial idea was by user "redvers76 or redvers" from https://github.com/RMerl/asuswrt-merlin/wiki/Setting-a-random-password-for-guest-wifi
Additional ideas/features were made by user "RoutNew36" from http://www.snbforums.com/threads/setting-a-random-password-for-guest-wifi.22700/

Functionality wise I stayed as close as "RoutNew36" version. I changed the Android app (.apk) in a simple website so every client can be used.
Furthermore I simplified all scripts and made them more readable, debuggable and configurable.

Download link:
You can always find the latest here: http://i872272.iris.fhict.nl/downloads/guestwifi/guestwifi.rar
Previous versions: http://i872272.iris.fhict.nl/downloads/guestwifi/guestwifi_v1.01.rar

Changelog:
v1.00 - 06 aug 2015 : initial version
v1.01 - 07 aug 2015 : [fix] changed relative path to absolute path in CheckGuestPassword.sh because it's called from cronjob from an unknown path
v1.10 - 10 aug 2016(!): [fix] generated password was saved in /tmp but this directory is emptied when router is rebooted
 
After a year I made a bugfix of my version of the original by redvers (more info see installation.txt in .rar file):

Extra features compared to "redvers" version:
-simple website to read/set the wifi password and remaining lifetime
-authentication between webserver and router is by using SSH with plain password (connection settings see ssh.php)
-automatic decreasing lifetime of used password
-non-used password will last forever until viewed by the webpage
-on the Router > System Log > General Log you can see important "guestwifi" events

Initial idea was by user "redvers76 or redvers" from https://github.com/RMerl/asuswrt-merlin/wiki/Setting-a-random-password-for-guest-wifi
Additional ideas/features were made by user "RoutNew36" from http://www.snbforums.com/threads/setting-a-random-password-for-guest-wifi.22700/

Functionality wise I stayed as close as "RoutNew36" version. I changed the Android app (.apk) in a simple website so every client can be used.
Furthermore I simplified all scripts and made them more readable, debuggable and configurable.

Download link:
You can always find the latest here: http://i872272.iris.fhict.nl/downloads/guestwifi/guestwifi.rar
Previous versions: http://i872272.iris.fhict.nl/downloads/guestwifi/guestwifi_v1.01.rar

Changelog:
v1.00 - 06 aug 2015 : initial version
v1.01 - 07 aug 2015 : [fix] changed relative path to absolute path in CheckGuestPassword.sh because it's called from cronjob from an unknown path
v1.10 - 10 aug 2016(!): [fix] generated password was saved in /tmp but this directory is emptied when router is rebooted

This looks excellent! Thank you for continuing this project. :)

However, I can't download anything with your links. :(

I get a '404' error.

Is there any way you can make it amtm compatible and have @thelonelycoder include it there?

https://diversion.ch/amtm.html

https://www.snbforums.com/threads/amtm-the-snbforum-asuswrt-merlin-terminal-menu.42415/

https://github.com/decoderman/amtm

I'll be looking forward to seeing this script in amtm in the not too distant future, as I'm sure others will be too. :)
 
This looks excellent! Thank you for continuing this project. :)

However, I can't download anything with your links. :(

I get a '404' error.

Is there any way you can make it amtm compatible and have @thelonelycoder include it there?

https://diversion.ch/amtm.html

https://www.snbforums.com/threads/amtm-the-snbforum-asuswrt-merlin-terminal-menu.42415/

https://github.com/decoderman/amtm

I'll be looking forward to seeing this script in amtm in the not too distant future, as I'm sure others will be too. :)
FYI YazFi can set randomised passphrases for guests (but in terminal menu only - it isn't emailed anywhere EDIT: yet)
 
FYI YazFi can set randomised passphrases for guests (but in terminal menu only - it isn't emailed anywhere EDIT: yet)

Is there nothing Jack Yaz can't do? :D
 
This looks excellent! Thank you for continuing this project. :)

However, I can't download anything with your links. :(

I get a '404' error.

Is there any way you can make it amtm compatible and have @thelonelycoder include it there?

https://diversion.ch/amtm.html

https://www.snbforums.com/threads/amtm-the-snbforum-asuswrt-merlin-terminal-menu.42415/

https://github.com/decoderman/amtm

I'll be looking forward to seeing this script in amtm in the not too distant future, as I'm sure others will be too. :)

Sadly ... it appears that @JanOonk has not been active on this forum since 10th August 2016 [almost 3 years back] - so not sure how to get his latest mods. There is still the original Github version here https://github.com/RMerl/asuswrt-merlin/wiki/Setting-a-random-password-for-guest-wifi
Perhaps the prolific script writer ;) @Jack Yaz may be tempted into perfecting it and adding to his awesome YazFi add-on :cool:.
 
@kernol, Lol... Sorry, I usually pay attention to the post dates. :)

Yes, this would be great to add to the @Jack Yaz arsenal. :) :) :)
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top