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

    Captive portal can not display User in MAC pass through ???

    Scheduled Pinned Locked Moved Captive Portal
    9 Posts 4 Posters 1.6k 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.
    • T
      thuyle
      last edited by

      Hi Everybody!

      My Pfsense is just updated to version 2.2. But Captive portal fearture can not display User likes previous version.

      1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan
        last edited by

        Hi.

        You have set both
        Enable Pass-through MAC automatic additions
        and
        Enable Pass-through MAC automatic addition with username
        ?

        Also, pfSense will not find a user name by magic, il will use the 'auth_user' entry on from your (default) login page.

        Btw: it works for me (when I set both options)

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 0
        • T
          thuyle
          last edited by

          Hi!

          I was set both options but still not work! :-\

          1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan
            last edited by

            @thuyle:

            Hi!

            I was set both options but still not work! :-\

            The user is entering its 'name' when logging in ? (That is the name being used).

            You have a line like this

            in your portal login page ?

            What are all the others settings regarding to Services: Captive portal ?

            edit: Aha : what you see (no user name) happens when "Authentication" is set to "No Authentication".
            ( index.php : line
            https://github.com/pfsense/pfsense/blob/master/usr/local/captiveportal/index.php#L241
            will be taken, the user id will be set to "unauthenticated" so, no need to be a PHP wizard to find out what happens here :
            https://github.com/pfsense/pfsense/blob/master/etc/inc/captiveportal.inc#L2071 (up to line 2074) ;)

            If this is the case, no worry, I think I have a solution (very small 'patch') for you.

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            1 Reply Last reply Reply Quote 0
            • T
              thuyle
              last edited by

              Thank Gertjan!

              1 Reply Last reply Reply Quote 0
              • GertjanG
                Gertjan
                last edited by

                The problem was ?

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                1 Reply Last reply Reply Quote 0
                • D
                  doktornotor Banned
                  last edited by

                  @Gertjan:

                  The problem was ?

                  The problem was fixed.  ;D  :P

                  1 Reply Last reply Reply Quote 0
                  • T
                    thuyle
                    last edited by

                    @Gertjan:

                    The problem was ?

                    if ($username = "unauthenticated") {  // In captiveportal.inc#L2071  has only one equal symbol
                    $mac['descr'] =  "Auto-added";
                    } else {
                    $mac['descr'] =  "Auto-added for user {$username}";

                    Thank Gertjan !

                    1 Reply Last reply Reply Quote 0
                    • C
                      cmb
                      last edited by

                      @thuyle:

                      _if ($username = "unauthenticated") {  // In captiveportal.inc#L2071  has only one equal symbol

                      That was fixed in 2.2.1._

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.