Hi,
I have created LDAP user "ldapuser" and exported its home directory "/home/LDAP/ldapuser" to LDAP client by following steps and its working but when I replace /home/LDAP/ with /home/testdir/ or only /home it is not allowing to modify  database.

How can I export the user home directory from same location /home on client with "/home/ldapuser"?
Please help me.

[root@sc1435-7 home]# ldapmodify -x -D "cn=Manager,dc=ldapserver,dc=com" -W -f /etc/openldap/automount.ldif
Enter LDAP Password:
modifying entry "ou=auto.master,dc=ldapserver,dc=com"

modifying entry "ou=auto.home,dc=ldapserver,dc=com"

modifying entry "cn=/home, ou=auto.master,dc=ldapserver,dc=com"

modifying entry "cn=testdir,ou=auto.home,dc=ldapserver,dc=com"
ldap_modify: No such object (32)
        matched DN: ou=auto.home,dc=ldapserver,dc=com




Working Steps with "/home/LDAP/"
Step 1.
#mkdir /home/LDAP
cp -dpR  /home/ldapuser /home/LDAP/
Step 2.
Modify data base for "ldapuser" home directory :(as bellow)
Create ldif file for auto mount of home directory:(as bellow)
Step 3.
Edit /etc/exports for shard directory
[root@sc1435-7 home]# cat /etc/exports
/home/LDAP                  *(rw,sync)
# /usr/sbin/exportfs -a 
Step 4.
Add changes in LDAP data base :
ldapmodify -x -D "cn=Manager,dc=ldapserver,dc=com" -W -f /etc/openldap/ldapuser.ldif
ldapadd -x -D "cn=Manager,dc=ldapserver,dc=com" -W -f /etc/openldap/automount.ldif




Modify data base for "ldapuser" home directory :
# cat /etc/openldap/ldapuser.ldif
dn: uid=ldapuser,ou=People,dc=ldapserver,dc=com
uid: ldapuser
cn: ldapuser
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword: {crypt}$1$lxxxxxxxxxxxxxxxxxxxxxx.
shadowLastChange: 13968
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 500
gidNumber: 100
homeDirectory: /home/test/ldapuser

Create ldif file for auto mount of home directory:
# cat /etc/openldap/automount.ldif
dn: ou=auto.master,dc=ldapserver,dc=com
objectClass: top
objectClass: automountMap
ou: auto.master

dn: ou=auto.home,dc=ldapserver,dc=com
objectClass: top
objectClass: automountMap
ou: auto.home

dn: cn=/home, ou=auto.master,dc=ldapserver,dc=com
objectClass: automount
automountInformation: ldap:ou=auto.home,dc=ldapserver,dc=com --timeout 60
cn: /home

dn: ou=auto.home,dc=ldapserver,dc=com
objectClass: automount
automountInformation: -rw,hard,intr sc1435-7:/home



Thanks and regards,
Ashwani
Shaadi Partner