• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Show a username without Authentication

Scheduled Pinned Locked Moved Captive Portal
7 Posts 5 Posters 4.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    carbm1
    last edited by Jan 5, 2012, 7:30 PM

    I'm using Captive Portal simply for a TOS agreement. However, I would like a way when I go into the Status>Captive Portal to be able to "figure out" who is who.

    On the Captive Portal form I added:

    However, I guess since the authentication is not actually turned on it only shows "unauthenticated" on the Status > Captive Portal, Username.

    Yes, I know that someone could simply put the name "Seemore Butts" or "Ivanna Tinkle" and it would let them in but if so I can also Block the device because of it.

    This is a setup for a k-12 school system so I need a way to hold students accountable for activity. Hence the need for a TOS.

    ideas?

    Thanks,

    Craig

    1 Reply Last reply Reply Quote 0
    • M
      marcelloc
      last edited by Jan 6, 2012, 12:39 AM

      Without password, it will be really difficult.
      each studdent has a device?

      Can you associate mac addresses to users?

      Treinamentos de Elite: http://sys-squad.com

      Help a community developer! ;D

      1 Reply Last reply Reply Quote 0
      • E
        eri--
        last edited by Jan 6, 2012, 9:18 AM

        Try the attached patch, its against 2.0.1 and untested :)

        
        diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php
        index 201a234..a85a52b 100755
        --- a/usr/local/captiveportal/index.php
        +++ b/usr/local/captiveportal/index.php
        @@ -197,8 +197,11 @@ EOD;
             } else
                 portal_reply_page($redirurl, "error", $errormsg);
         } else if ($_POST['accept'] && $clientip && $config['captiveportal']['auth_method'] == "none") {
        -    captiveportal_logportalauth("unauthenticated",$clientmac,$clientip,"ACCEPT");
        -    portal_allow($clientip, $clientmac, "unauthenticated");
        +       $user = "unauthenticated";
        +       if ($_POST['auth_user'])
        +               $user = $_POST['auth_user'];
        +    captiveportal_logportalauth($user,$clientmac,$clientip,"ACCEPT");
        +    portal_allow($clientip, $clientmac, $user);
         } else {
             /* display captive portal page */
             portal_reply_page($redirurl, "login",null,$clientmac,$clientip);
        
        
        1 Reply Last reply Reply Quote 1
        • C
          carbm1
          last edited by Jan 6, 2012, 8:45 PM

          That worked perfectly!  Million thanks!

          1 Reply Last reply Reply Quote 0
          • C
            carbm1
            last edited by Jan 6, 2012, 9:30 PM

            Forgive me for not being competent enough to use diff …. but here is a slight modification that if they left it blank would redirect them right back to the Captive Portal.

            
                } else
                    portal_reply_page($redirurl, "error", $errormsg);
            } else if ($_POST['auth_user'] && $_POST['accept'] && $clientip && $config['captiveportal']['auth_method'] == "none") {
                $user = $_POST['auth_user'];
                captiveportal_logportalauth($user,$clientmac,$clientip,"ACCEPT");
                portal_allow($clientip, $clientmac, $user);
            } else {
                /* display captive portal page */
                portal_reply_page($redirurl, "login",null,$clientmac,$clientip);
            }
            
            
            1 Reply Last reply Reply Quote 0
            • R
              rhy7s
              last edited by Feb 2, 2012, 3:15 AM

              Thanks for those replies, I was just coming here to ask the very same question as the OP. I'll try those patches some time when people aren't using the CP. Just thought I'd check another thing in the same vein, does anyone know if it would be possible to pull in the connected device's hostname for display on the CP template? They show up in the DHCP leases so I assume they are accessible from somewhere..

              1 Reply Last reply Reply Quote 0
              • T
                t3rmin
                last edited by Feb 6, 2012, 5:16 PM

                Just what I was looking for! I want to protect the network at the WPA level (to completely keep out the curious) and use the captive portal for TOS. This isn't a public network, but it isn't entirely private, either. The idea is for contractors and consultants and such to be able to get internet access. They get the password from us, then have to agree to the TOS before continuing.

                I was thinking it'd be nice to have somebody enter their name before clicking "Agree and Continue", but it didn't show up the logs. This patch fixes that! Thanks so much!

                It would be nice to prevent them from leaving it blank, too. Maybe an option in the UI for "No authentication but still require (and log) a username"? :)

                1 Reply Last reply Reply Quote 0
                • G gtt1229 referenced this topic on Nov 28, 2022, 4:16 PM
                • R regexaurus referenced this topic on May 16, 2025, 7:10 PM
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                  This community forum collects and processes your personal information.
                  consent.not_received