Hello Paul,

can you try that:


diff --git 
a/html/captive-portal/lib/captiveportal/PacketFence/Controller/Authenticate.pm 
b/html/captive-portal/lib/captiveportal/PacketFence/Controller/Authenticate.pm
index 277fd9f..2e8be4a 100644
--- 
a/html/captive-portal/lib/captiveportal/PacketFence/Controller/Authenticate.pm
+++ 
b/html/captive-portal/lib/captiveportal/PacketFence/Controller/Authenticate.pm
@@ -17,7 +17,7 @@ use HTML::Entities;
  use List::MoreUtils qw(any uniq all);
  use pf::config;
  use pf::auth_log;
-use pf::person qw(person_modify);
+use pf::person qw(person_modify person_exist person_add);
  use Email::Valid;

  BEGIN { extends 'captiveportal::Base::Controller'; }
@@ -132,6 +132,9 @@ sub authenticationLogin : Private {
              $c->user_session->{username} = $username // $default_pid;
              $c->user_session->{source_id} = $source_id;
              $c->user_session->{source_match} = $source_id;
+            if(!person_exist($username)){
+                person_add($username);
+            }
              # Logging USER/IP/MAC of the just-authenticated user
              $logger->info("Successfully authenticated 
".$username."/".$portalSession->clientIp."/".$portalSession->clientMac);
          } else {

Regards

Fabrice



Le 2016-08-24 à 08:53, Paul Coates a écrit :
> Yes that is the page we have enabled. The source is set to our active
> directory. We can see the authentication on that page working from the
> packetfence logs. The problem is when a user logins in on that page and
> registers their MAC, they get the message that it registered OK, but
> unless they already have an entry in the person table in the pf database
> (i.e. the Users list), the MAC registration is actually stored as unreg
> and assigned to user default, not the person who logged into the site.
> Logging into the site does not add an entry to the Users list which I
> believe is a bug. This is a new CentOS 6 build for this project.
>
> We are thinking about populating the person table each day from a script
> as a work around if we can't find why this happens.
>
> Paul
>
> On 24/08/16 12:04, Torry, Andrew wrote:
>> There is a specific web page that enabled 'Device Registration'.
>> You need to 'Enable' it in the Configuration->Registration
>>
>> Your users then go to https://YOURPACKETFENCE/Device-Registration
>> where they enter a username and password.
>>
>> The credentials they can use must be matched by one of your defined 
>> authentication
>> SOURCES (or the local user database or both).
>>
>> The portal asks you for credentials then for the MAC address of the device 
>> before
>> registering it.
>>
>> Andrew
>>
>>
>>
>>
>> -----------------------------
>>        Falmouth University
>> -----------------------------
>>
>> -----Original Message-----
>> From: Paul Coates [mailto:[email protected]]
>> Sent: 23 August 2016 13:44
>> To: [email protected]
>> Subject: [PacketFence-users] device-registration page
>>
>> We are attempting to configure PacketFence 6.0.3 to provide student
>> halls access using a captive portal/802.1x/MAC Auth. We have an issue
>> with the /device-registration interface. I have been using the form to
>> add additional devices OK, then I asked a colleague (Jon) to try it and
>> all his registrations appear in the Nodes page as unregistered and the
>> owner is default.
>>
>> I have used the captive portal to test it and I appear in the list of
>> Users. Jon has not and is not in the user list. I had assumed when he
>> logs in on the /device-registration page he would be added to the Users
>> list automatically, but he is not. Is this a bug? If not how can I
>> change the behavior to automatically create the user?
>>
>> I'm thinking of the scenario of a student turning up with a game console
>> but no PC/laptop, so does not have a device he can register via the
>> captive portal. A work around seems to be manually creating a user for
>> this student with a fake password (since you need to enter one), then
>> under the portal profile set the Sources to just use the Active
>> Directory to authenticate users.
>>
>> Thanks,
>>
>> Paul
>>
>> --
>> Paul Coates, Newcastle University, Network Team
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> PacketFence-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/packetfence-users
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> PacketFence-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/packetfence-users
>
> ------------------------------------------------------------------------------
> _______________________________________________
> PacketFence-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/packetfence-users

-- 
Fabrice Durand
[email protected] ::  +1.514.447.4918 (x135) ::  www.inverse.ca
Inverse inc. :: Leaders behind SOGo (http://www.sogo.nu) and PacketFence 
(http://packetfence.org)


------------------------------------------------------------------------------
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to