RE: AW: entry in /etc/passwd

From: Andrew Hatfield (
Date: 05/07/02

Date: Tue, 7 May 2002 09:36:45 +1000
From: "Andrew Hatfield" <>
To: <>, <>

> If you want to do me - and tons of other people, I guess, a
> favour, write a
> script that'll initialize an LDAP server (easy enough to
> install) and set it
> up so that it handles user authentications. I looked at
> freshmeat and other
> sources and found nothing. If someone can point me to an
> easy-to-setup LDAP
> thingy, I'll switch the developer network over on the same day.

In the OpenLDAP source and distribution packages (at least RedHat's),
there are migration tools to do just this.
Look in /usr/share/openldap/migration for example.

You can import /etc/passwd, /etc/group, /etc/shadow, /etc/hosts,
/etc/rpc, /etc/protocols, /etc/services, /etc/netgroups, /etc/fstab,
/etc/networks for example.

There are a number of perl and bash scripts. Its all pretty easy once
you understand the basic format. You can do either an online import, or
an offline. Both are supported by the migration scripts, so take your

I would review how the user accounts are created and make sure they fit
your account policy before migrating though - as I personally don't like
the way it creates the DN record, but thats just me.

  Andrew Hatfield
  RedHat Certified Engineer
  Head - Internet Security Division

  Hatfield & Associates Pty. Ltd.
  Phone : +61 7 3849 7155
  Fax : +61 7 3849 6277
  Email :
  Web :