[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: ACLs



This might be too silly. But then again, it might be a start.
You would need to add some ldapmodify commands too.

Makefile:

.INTERMEDIATE: pw1 pw2

pw.ldif: pw1 pw2
  join -t: pw2 pw1 | awk -f pw2ldif.awk > $@

pw1: /etc/passwd
  cut -d: -f1,3- $? >$@

pw2: /etc/shadow
  cut -d: -f1,2 $? >$@


pw2ldif.awk:

BEGIN {
  FS = ":";
  f = 1;
  uid = f++;
  pw = f++;
  u = f++;
  g = f++;
  gcos = f++;
}

{
  printf( "uid: %s\n", $uid );
  printf( "userPassword: {crypt}%s\n", $pw );
  x = split( $gcos, a, "," );
  if ( 0 < x && 0 < length( a[1] ) ) {
    printf( "cn: %s\n", a[1] );
  }
  print "";
}

-----Original Message-----
From: Ron Braley [mailto:braley@aero.und.edu]
Sent: Thursday, March 15, 2001 8:14 AM
To: openldap-software@OpenLDAP.org
Subject: Re: ACLs


Hi - newbie question:  Can I import existing UNIX user and group
information into OpenLDAP to save the trouble of creating everything by
hand and making everyone change passwords?  Also, how well does OpenLDAP
play with Microsoft's Active Directory and NDS?

Thanks so much for any advice or help!

Ron Braley


Ron Braley
UNIX Systems / Network Administrator
University of North Dakota - Aerospace
braley@aero.und.edu
701-777-2964 (work)
701-777-2940 (fax)