Wesley,
The coding to poplulate the LDAP directory can be relatively straight forward
once you figure out other pieces. First, you need to understand the structure
of your LDAP directory and where your users fit in it. Then you need to know
where all the data is that you will use for sources. An important issue is how
to deal with passwords. You most likely can't find cleartext passwords for
existing users. This means that you need to find a way to get new passwords
for them. That is the hardest part of what you are trying to do. There are at
least 2 strategies: build a password changing mechanism that can bounce against
the old password in nis and create a new one in ldap (and preferably also in
nis) or you can assign new (LDAP only?) passwords to users and distribute them
in some way. You also need to figure out what attributes you need for each
user.
This one line of code (or similar) is what actually adds a user:
my $refs = $ldap->add ($dn, attrs => \@attrs);
$dn is built by knowing the structure of you LDAP tree. @attrs can be built by
lines like
push @attrs, (givenName => $firstname);
--Jim Harle
On Thu, 27 Mar 2003, Wesley Hof. wrote:
> Hi,
>
> I have a question, I'm planning a migration from a proftpd that uses nis, to
> a proftpd that uses LDAP.
>
> The problem is I don't have a major LDAP knowledge. Is there an example
> perlscript available to full the ldap with
> usernames/passes/quota/dir so that proftpd finds the needed info?
>
> Thanks in advance for the replys.
>
> Wesley.
>
>
> --
> Hey it compiles! Ship it! (M$)
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by:
> The Definitive IT and Networking Event. Be There!
> NetWorld+Interop Las Vegas 2003 -- Register today!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
>
|