netgroupcache.pl - a programme to make a local cache of LDAP netgroups.
This programme pulls a copy of netgroups from the LDAP server, prefixes their name with 'local' and places them in the /etc/netgroups file
by doing this, you can configure access.conf to also allow these local netgroups. thus allowing login even if the LDAP server is not online to answer netgroup queries.
This script should be run from cron at an appropriate interval.
A configuration file is required in /etc/netgroupcache.conf An example is below:
#Global config #These options are passed to OSS::LDAPops and are all required. $GLOBAL::config = { LDAPHOST => 'ldap01.mydomain.net', BINDDN => 'uid=webportal, ou=writeaccess, dc=auth, dc=mydomain,dc=net', BASEDN => 'dc=auth,dc=mydomain,dc=net', NISDOMAIN => 'auth.mydomain.net', PASSWORD => 'xyzzy' }; #This 1 is required! 1;
This example is also included in the source distribution.
netgroupcache.pl <netgroup> <netgroup> <netgroup> .....
\* may be used as a wildcard, including as the only argument to get all netgroups.
(you can add as many netgroups as you like)
This code uses OSS::LDAPops Please see the OSS::LDAPops manual for more details.
1 POD Error
The following errors were encountered while parsing the POD:
Unknown directive: =head
To install OSS::LDAPops, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OSS::LDAPops
CPAN shell
perl -MCPAN -e shell install OSS::LDAPops
For more information on module installation, please visit the detailed CPAN module installation guide.