File: ldap-import

package info (click to toggle)
gforge 4.5.14-22etch13
  • links: PTS
  • area: main
  • in suites: etch
  • size: 13,004 kB
  • ctags: 11,918
  • sloc: php: 36,047; sql: 29,050; sh: 10,538; perl: 6,496; xml: 3,810; makefile: 341; python: 263; ansic: 256
file content (18 lines) | stat: -rwxr-xr-x 446 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl
#
#  Import LDIF file to LDAP database
#  by pfalcon@users.sourceforge.net 2000-10-18
#  $Id: ldap-import 1221 2002-12-23 13:17:23Z lo-lan-do $
#

require("include.pl");  # Include all the predefined functions
&parse_local_inc;

if (!($#ARGV+1)) {
	print "Usage: $0 <ldif_file>\n";
	exit;
}

$cmd = "${ldap_prefix}ldapadd -h $sys_ldap_host -p $sys_ldap_port -D '$sys_ldap_admin_dn' -W -f $ARGV[0]";
#print "$cmd\n";
system($cmd);