Hi Mourik,

it will be done only the first time the user is created.

But you can try this (Replace AD with your AD source name):

-------------------------
#!/usr/bin/perl
=head1 NAME

person.pl - Person Lookup

=cut
require 5.8.5;
use strict;
use warnings;

use FindBin;
use Pod::Usage;

BEGIN {
     use constant INSTALL_DIR => '/usr/local/pf';
     use lib INSTALL_DIR . "/lib";
}

use pf::node;
use pf::db;
use pf::util;
use pf::person;
use pf::lookup::person;

my @person = person_view_all;
my $source_id = 'AD';

foreach my $pers ( @person ) {

     pf::lookup::person::lookup_person($pers->{'pid'},$source_id);

}


=head1 AUTHOR

Inverse inc. <i...@inverse.ca>

=head1 COPYRIGHT

Copyright (C) 2005-2015 Inverse inc.

=head1 LICENSE

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.

=cut

# vim: set shiftwidth=4:
# vim: set expandtab:
# vim: set backspace=indent,eol,start:
--------------------------


Regards
Fabrice

Le 2015-06-21 16:07, mourik jan heupink a écrit :
> Hi Fabrice,
>
> Ah right.
>
> But this is not what I see..?
>
> I have just authenticated via our AD, and only have a username set, all
> other fields are empty. I'm using the regular AD fields, and my
> firstname, sn, etc are set.
>
> Do I need to configure something special, perhaps? Or do I need to do
> "pfcmd lookup person E<lt>pidE<gt>" to fill in my other details?
>
> (I am talking about the normal userlist, in the admin gui)
>
> MJ
>
>
>
>
> On 06/21/2015 09:52 PM, Durand fabrice wrote:
>> Hi Mourik,
>>
>> this is already the case:
>> https://github.com/inverse-inc/packetfence/blob/devel/lib/pf/lookup/person.pm
>>
>> Regards
>> Fabrice
>>
>>
>> Le 2015-06-21 15:24, mourik jan heupink a écrit :
>>> Hi,
>>>
>>> Is there a way to make packetfence take user's details from active
>>> directory? It seems now just the 'username' is copied, and the rest is
>>> left blank.
>>>
>>> It would be nice to fill more details, like firstname, lastname,
>>> telephone, email... it's all there in AD...
>>>
>>> MJ
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> PacketFence-users mailing list
>>> PacketFence-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/packetfence-users
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> PacketFence-users mailing list
>> PacketFence-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/packetfence-users
>>
> ------------------------------------------------------------------------------
> _______________________________________________
> PacketFence-users mailing list
> PacketFence-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/packetfence-users


------------------------------------------------------------------------------
_______________________________________________
PacketFence-users mailing list
PacketFence-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to