Connect Yun to company guest network - username

Hi
I need to connect my Yun to our company guest network
The network SSID and the WPA passcode is configured via the Yun web interface but to log on the guest needs to open the internet explorer and login with the username = mail adress and once more the passcode.

Can i fix that or is this a nogo for Yun at my workplace?

Thx, Gernot

geab:
::::SNIP::::

Can i fix that or is this a nogo for Yun at my workplace?

Thx, Gernot

@geab, the Yun is based on OpenWrt. If you can configure the system yourself, then you can change it. A list of wifi recipes is available at OpenWrt.

http://wiki.openwrt.org/doc/howto/start

Does this help?

Jesse

Thx Jesse for pointing me into that direction

Unfortuntely I am not in charge to change settings;

will it be possible to run a firefox from the Yun and provide the username and passcode?

What you are asking is HTTP authentication (browser or API) for Captive Portal.

Incomplete Captive Portal Solutions:

  • Chillispot: Layer 2 solution using a radius database for the backend user management and tracking. WARNING: This project may be dead. There hasn't really been much work on this project for years. Which leads to the next project.
  • CoovaChilli: Built on top of Chillispot with several improvements and additions. Includes WISPr support, and much more. Main captive portal solution used in CoovaAP mentioned by jhonkola.
  • PepperSpot: Another Chillispot fork. Support for IPv6 protocol, Wireless Protected Access (WPA). Also radius server backend.
  • NoCat: A series of projects to create a captive portal like solution offering simple setup and free public internet.
  • WiFiDog: Originally forked from NoCatSplash and NoCatAuth, Wifidog offers a simple package and none uci based configuration file. Users can be managed and controlled through the gateway and hooked into any custom user management. This solution creates a custom central user management system. You can build your own login page and user management system or use their own portal system.
  • NoDogSplah: Another alternative from NoCat which aims to offer captive portal solutions local to the router/gateway and a simplistic setup, user bandwidth control and basic auth/splash page.

Each Solution need own HTTP authentication method (browser or API). The worst situation is API login is security breach, none of them support it. have to cook it yourself.

geab:
Thx Jesse for pointing me into that direction

Unfortuntely I am not in charge to change settings;

will it be possible to run a firefox from the Yun and provide the username and passcode?

I'm confused as to what are trying to do. You say for your network, there is a two phase process.

Phase #1) Setup SSID and the WPA passcode.

Phase #2) Bring up a webbrowser, give email and password.

You say you cannot do what? That part is not clear.

If you cannot change your network setting, can you find someone that can?

If not, you will likely need to load Lynx so that can be your webbrowser.
There are other solutions, but you are being to terse.

Jesse

jessemonroy650:
Phase #2) Bring up a webbrowser, give email and password.

You say you cannot do what? That part is not clear.

I believe that he wants the Yun to do that part automatically. It can associate to the network, but then it has to log in before it can actually do anything. I'm not big on curl, but perhaps it could do that authentication step?

If you cannot change your network setting, can you find someone that can?

It's not his network, it's a company network. I doubt that they will change their network security policy to accommodate a Yun.

Time ago I found a way to let the Yun automatically log into a captive portal. The bad thing is that every captive portal uses his own method and there is not a general solution.

What you can do is looking at the html code of the login page and find the code of the login form. Then you should be able to see the destination of the POST call and the names of parameters you need (usually username,password).

Then you can perform a POST request with curl directly from the Yun and if you are lucky it will login to the captive portal.
Sometimes captive portals requires some javascript code to be executed and that can make the entire process more complicated.

@Shapeshifter - you are completly right

and

@Angelo9999 - this sounds like a splendid idea - will check that tomorrow

Thank you all for interest and support

cheers, Gernot

here is the code i found

<TABLE width="500" cellpadding=0 cellspacing=0 border=0>
<tr><td align=center>
   <form name="form1" method="post" action="http://10.xxx.xx.xx:xxxx/usg/process">
     <p>

       <input type="text" name="OS" value="http://www.xxx.xxx" size="29">




       <b><font size="2">Username: (your email address)</font></b>

       <input type="text" name="username" value="" size="29">


       

       <b><font size="2">Accesscode/Password:</font></b>

       <input type="password" name="password" value="" size="29">
     </p>

     <p>
       <input type="submit" name="Login" value="Login">
     </p>
   </form>

will i use curl this way:

 curl --"user name":"passcode" ="http://10.xxx.xx.xx:xxxx/usg/process"

Use code tag wrapped the code please.

nano /mnt/sda1/login.sh
#!/bin/ash
curl --cookie-jar cookie.txt --data "username=abc@abc.com&password=somepassword&Login=Login" http://10.xxx.xx.xx:xxxx/usg/process
curl --cookie cookie.txt --cookie-jar cookie.txt http://10.xxx.xx.xx:xxxx/usg/redirect
chmod 755 /mnt/sda1/login.sh
/mnt/sda1/login.sh

A lot of case "http://10.xxx.xx.xx:xxxx/usg/process" will redirect browser to a other page "http://10.xxx.xx.xx:xxxx/usg/redirect" and will check the cookies set up by /usg/process.

http://forum.arduino.cc/index.php?topic=329397.msg2277196#msg2277196