Hey Brett,

Populate an array and use this perl snippit:

#!/usr/bin/perl

$pfCMD = '/usr/local/pf/bin/pfcmd ';

#either edit this here or pull this in from a file or ??
@array_of_macs("00:00:00:00:00","01:01:01:01:01");

system("$pfCMD person add prereg");

foreach my $node (@array_of_macs) {

        $cmd = "$pfCMD node add $node status='reg',pid='$person'";
        my $registerResponse = readpipe($cmd);
        print "Response for $node = $registerResponse\n";
        }

That will add the user without anything fancy.  If you want an unregdate
(when the node will be automatically set to unreg) add the param
unregdate='YYYY-MM-DD HH:MM:SS' with your values to the $cmd bit above
(don't miss the comma!!)

Good luck.  Feel free to ping me on or off list.

-Josh

--
Josh Ward <[email protected]>
Network Security Engineer
University of Oregon - Network and Telecommunication Services
PGP Fingerprint: CFB6 62C0 370B AD6D BA33 6034 8FFB 4A49 297F 6A4C


On 8/6/10 11:32 AM, Brett A. Karns wrote:
> 
> 
> Hello,
> 
>  
> 
> Is there a way for me to import a large list of MAC addresses that I 
> want to register.  Something like CSV, tab delimited text file or
> anything like that?
> 
>  
> 
> *___________________________________________*
> 
> *Brett A. Karns *
> 
> Systems Administrator
> 
> Information Technology
> 
> Penn State University Electro-Optics Center
> 
> *Northpointe Industrial Park*
> 
> *222 Northpointe Boulevard*
> 
> *Freeport, PA  16229 *
> 
> *Email: [email protected] <mailto:[email protected]>*
> 
> *PHONE: 724-295-7000 x7101*
> 
> *FAX: 724-295-7001*
> 
> *WEB: www.electro-optics.org <http://www.electro-optics.org/> *
> 
>  
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by 
> 
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev 
> 
> 
> 
> _______________________________________________
> Packetfence-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/packetfence-users


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Packetfence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to