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

(ITS#5878) Unable to add users from file generated by migrate_passd.pl



Full_Name: Sandeep Kumbhar
Version: openldap-2.3.27-8.el5_1.3 
OS: CentOS 5.2 
URL: 
Submission from: (NULL) (59.181.122.24)


1. I am using below schema for my LDAP server
   
   include		/etc/openldap/schema/core.schema
   include		/etc/openldap/schema/cosine.schema
   include		/etc/openldap/schema/inetorgperson.schema
   include		/etc/openldap/schema/nis.schema
 
2. I created local user on the same server and did the following to generate the

   data for step 3.

   # grep 'username' /etc/passwd > /etc/openldap/passwd.username

Ref: <http://fedoranews.org/mediawiki/index.php/How_to_setup_and_maintain_OpenLDAP_server_for_your_network#Bonus:_Exporting_LDAP_users_home_folders_with_NFS>

3. Then I used the migration perl script for converting the local users to LDAP
   users.

   # /usr/share/openldap/migration/migrate_passwd.pl
/etc/openldap/passwd.username \
     /etc/openldap/username.ldif

4. Now after creation of the *.ldif I used the below command to add this
database 
   file into the LDAP server.

  # ldapadd -x -D "cn=Manager,dc=intra,dc=exlinuz,dc=com" -W -f /etc/openldap/
\
    username.ldif

5. After typing the ldapadd command I gave the LDAP password I got the error
below

   adding new entry "uid=sandeepk,ou=People1,dc=intra,dc=exlinuz,dc=com"
   ldap_add: No such object (32)
        matched DN: dc=intra,dc=exlinuz,dc=com

6. I have created the domain.ldif and root.ldif and added them successfully into
the 
   LDAP Server using the official Openldap documentation.
   However I could not find anything adding Unix users and therefore I used the 

   above referenced link to generate Unix users database file for LDAP.

   Please see the ldif file output by the migration script
 
dn: uid=samk,ou=People1,dc=intra,dc=exlinuz,dc=com
uid: samk
cn: samk
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword: {crypt}$1$eBNsXmF1$L9/bK4vbjkAOCKa5DKKAE0
shadowLastChange: 14249
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 500
gidNumber: 500
homeDirectory: /home/samk