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

adding /etc/passwd to ldap?



I started clean and LDAP is working, the only thing in there right now is:

dn: dc=test, dc=com
dc: test
o: Testing Inc
objectclass: organization
objectclass: dcObject

dn: cn=Manager, dc=test, dc=com
cn: Manager
sn: Manager
objectclass: person

and that seems to be working fine.  What I want to do is add all users from
/etc/passwd into the ldap directory.  I am going to use LDAP for a type of
NIS replace, say have 3 systems and any user can log into any machine and
get the exact same envoirment, able to download email from any server
(provided there password is correct).  Before I get pam, sendmail and pop3
working, I wanted to get a standard telnet/ssh/console login working for
every user in the /etc/passwd, but not sure how to go about it.

MigrationTools-24 was downloaded and the command:

`./migrate_passwd.pl /etc/passwd ./pass.ldif` works fine, the file
'pass.ldif' looks like this:

dn: uid=root,ou=People,dc=padl,dc=com
uid: root
cn: Super-User
objectClass: account
objectClass: posixAccount
objectClass: top
userPassword: {crypt}x
loginShell: /sbin/sh
uidNumber: 0
gidNumber: 1
homeDirectory: /root
gecos: Super-User

dn: uid=daemon,ou=People,dc=padl,dc=com
uid: daemon
cn: daemon
objectClass: account
objectClass: posixAccount
_SNIP_

But when I got a:

`/usr/local/bin/ldapadd -D "cn=Manager, dc=netmate, dc=com" -W <
ldif/pass.ldif`
Enter LDAP Password: ******
adding new entry uid=root,ou=People,dc=padl,dc=com
ldap_add: No such object

What do you think is the best way of going about this? Any documents on what
DN these users should be under?

Thanks,
Jack

Humor or Insanity?
http://www.geekweb.org