Hi Brett, Josh
Josh Ward wrote:
> 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.
>
and it will probably be slow but that's not Josh's fault. A faster way
would be to insert directly into MySQL figuring out the node table. A
tool like phpmyadmin makes this kind of work very easy to do.
We are considering a bulk import web interface, anyone willing to
sponsor the feature (and direct the specs)?
Cheers!
--
Olivier Bilodeau
[email protected] :: +1.514.447.4918 *115 :: www.inverse.ca
Inverse inc. :: Leaders behind SOGo (www.sogo.nu) and PacketFence
(www.packetfence.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