Solved

Cant setup LDAP pls help!!!!!!!!!

Posted on 2009-04-10
20
1,018 Views
Last Modified: 2012-05-06
Hi,

i want to test out  LDAP server iam following this article

http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch31_:_Centralized_Logins_Using_LDAP_and_RADIUS

i did exactly as described but when i tried to run /usr/share/openldap/migration/migrate_all_offline.sh

My server is RHEL5 its also is an domain named Example.com
it throws me HUGE error pls see the attached snippet Sorry for very long error.

Thanks
[root@domain15 log]# /usr/share/openldap/migration/migrate_all_offline.sh

Creating naming context entries...

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

  (Might be a runaway multi-line "" string starting on line 1)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = "dc"

        (Missing operator before dc?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h ""

  (Might be a runaway multi-line "" string starting on line 4)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h "ldap"

        (Missing operator before ldap?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = ""

  (Might be a runaway multi-line "" string starting on line 10)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = "mail"

        (Missing operator before mail?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 58, near "if (-x ""

  (Might be a runaway multi-line "" string starting on line 16)

        (Missing semicolon on previous line?)

syntax error at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

Compilation failed in require at /usr/share/openldap/migration/migrate_base.pl line 39.

Migrating groups...

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

  (Might be a runaway multi-line "" string starting on line 1)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = "dc"

        (Missing operator before dc?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h ""

  (Might be a runaway multi-line "" string starting on line 4)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h "ldap"

        (Missing operator before ldap?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = ""

  (Might be a runaway multi-line "" string starting on line 10)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = "mail"

        (Missing operator before mail?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 58, near "if (-x ""

  (Might be a runaway multi-line "" string starting on line 16)

        (Missing semicolon on previous line?)

syntax error at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

Compilation failed in require at /usr/share/openldap/migration/migrate_group.pl line 39.

Migrating hosts...

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

  (Might be a runaway multi-line "" string starting on line 1)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = "dc"

        (Missing operator before dc?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h ""

  (Might be a runaway multi-line "" string starting on line 4)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h "ldap"

        (Missing operator before ldap?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = ""

  (Might be a runaway multi-line "" string starting on line 10)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = "mail"

        (Missing operator before mail?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 58, near "if (-x ""

  (Might be a runaway multi-line "" string starting on line 16)

        (Missing semicolon on previous line?)

syntax error at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

Compilation failed in require at /usr/share/openldap/migration/migrate_hosts.pl line 39.

Migrating networks...

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

  (Might be a runaway multi-line "" string starting on line 1)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = "dc"

        (Missing operator before dc?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h ""

  (Might be a runaway multi-line "" string starting on line 4)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h "ldap"

        (Missing operator before ldap?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = ""

  (Might be a runaway multi-line "" string starting on line 10)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = "mail"

        (Missing operator before mail?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 58, near "if (-x ""

  (Might be a runaway multi-line "" string starting on line 16)

        (Missing semicolon on previous line?)

syntax error at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

Compilation failed in require at /usr/share/openldap/migration/migrate_networks.pl line 39.

Migrating users...

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

  (Might be a runaway multi-line "" string starting on line 1)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = "dc"

        (Missing operator before dc?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h ""

  (Might be a runaway multi-line "" string starting on line 4)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h "ldap"

        (Missing operator before ldap?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = ""

  (Might be a runaway multi-line "" string starting on line 10)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = "mail"

        (Missing operator before mail?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 58, near "if (-x ""

  (Might be a runaway multi-line "" string starting on line 16)

        (Missing semicolon on previous line?)

syntax error at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

Compilation failed in require at /usr/share/openldap/migration/migrate_passwd.pl line 40.

Migrating protocols...

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

  (Might be a runaway multi-line "" string starting on line 1)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = "dc"

        (Missing operator before dc?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h ""

  (Might be a runaway multi-line "" string starting on line 4)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h "ldap"

        (Missing operator before ldap?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = ""

  (Might be a runaway multi-line "" string starting on line 10)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = "mail"

        (Missing operator before mail?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 58, near "if (-x ""

  (Might be a runaway multi-line "" string starting on line 16)

        (Missing semicolon on previous line?)

syntax error at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

Compilation failed in require at /usr/share/openldap/migration/migrate_protocols.pl line 39.

Migrating rpcs...

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

  (Might be a runaway multi-line "" string starting on line 1)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = "dc"

        (Missing operator before dc?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h ""

  (Might be a runaway multi-line "" string starting on line 4)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h "ldap"

        (Missing operator before ldap?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = ""

  (Might be a runaway multi-line "" string starting on line 10)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = "mail"

        (Missing operator before mail?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 58, near "if (-x ""

  (Might be a runaway multi-line "" string starting on line 16)

        (Missing semicolon on previous line?)

syntax error at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

Compilation failed in require at /usr/share/openldap/migration/migrate_rpc.pl line 39.

Migrating services...

Unquoted string "example" may clash with future reserved word at /usr/share/openldap/migration/migrate_common.ph line 1.

Unquoted string "com" may clash with future reserved word at /usr/share/openldap/migration/migrate_common.ph line 1.

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

  (Might be a runaway multi-line "" string starting on line 1)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = "dc"

        (Missing operator before dc?)

Unquoted string "dc" may clash with future reserved word at /usr/share/openldap/migration/migrate_common.ph line 4.

Unquoted string "example" may clash with future reserved word at /usr/share/openldap/migration/migrate_common.ph line 4.

Unquoted string "dc" may clash with future reserved word at /usr/share/openldap/migration/migrate_common.ph line 4.

Unquoted string "com" may clash with future reserved word at /usr/share/openldap/migration/migrate_common.ph line 4.

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h ""

  (Might be a runaway multi-line "" string starting on line 4)

        (Missing semicolon on previous line?)

Possible unintended interpolation of @Kristof in string at /usr/share/openldap/migration/migrate_common.ph line 4.

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h "ldap"

        (Missing operator before ldap?)

Unquoted string "ldap" may clash with future reserved word at /usr/share/openldap/migration/migrate_common.ph line 10.

Unquoted string "example" may clash with future reserved word at /usr/share/openldap/migration/migrate_common.ph line 10.

Unquoted string "com" may clash with future reserved word at /usr/share/openldap/migration/migrate_common.ph line 10.

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = ""

  (Might be a runaway multi-line "" string starting on line 10)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = "mail"

        (Missing operator before mail?)

Unquoted string "mail" may clash with future reserved word at /usr/share/openldap/migration/migrate_common.ph line 16.

Unquoted string "example" may clash with future reserved word at /usr/share/openldap/migration/migrate_common.ph line 16.

Unquoted string "com" may clash with future reserved word at /usr/share/openldap/migration/migrate_common.ph line 16.

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 58, near "if (-x ""

  (Might be a runaway multi-line "" string starting on line 16)

        (Missing semicolon on previous line?)

syntax error at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

Compilation failed in require at /usr/share/openldap/migration/migrate_services.pl line 40.

Migrating netgroups...

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

  (Might be a runaway multi-line "" string starting on line 1)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = "dc"

        (Missing operator before dc?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h ""

  (Might be a runaway multi-line "" string starting on line 4)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h "ldap"

        (Missing operator before ldap?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = ""

  (Might be a runaway multi-line "" string starting on line 10)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = "mail"

        (Missing operator before mail?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 58, near "if (-x ""

  (Might be a runaway multi-line "" string starting on line 16)

        (Missing semicolon on previous line?)

syntax error at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

Compilation failed in require at /usr/share/openldap/migration/migrate_netgroup.pl line 39.

Importing into LDAP...

Migrating netgroups (by user)...

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

  (Might be a runaway multi-line "" string starting on line 1)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = "dc"

        (Missing operator before dc?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h ""

  (Might be a runaway multi-line "" string starting on line 4)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h "ldap"

        (Missing operator before ldap?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = ""

  (Might be a runaway multi-line "" string starting on line 10)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = "mail"

        (Missing operator before mail?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 58, near "if (-x ""

  (Might be a runaway multi-line "" string starting on line 16)

        (Missing semicolon on previous line?)

syntax error at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

Compilation failed in require at /usr/share/openldap/migration/migrate_netgroup_byuser.pl line 39.

Migrating netgroups (by host)...

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

  (Might be a runaway multi-line "" string starting on line 1)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = "dc"

        (Missing operator before dc?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h ""

  (Might be a runaway multi-line "" string starting on line 4)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 10, near "#define(`confLDAP_DEFAULT_SPEC',`-h "ldap"

        (Missing operator before ldap?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = ""

  (Might be a runaway multi-line "" string starting on line 10)

        (Missing semicolon on previous line?)

Bareword found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 16, near "# $DEFAULT_MAIL_HOST = "mail"

        (Missing operator before mail?)

String found where operator expected at /usr/share/openldap/migration/migrate_common.ph line 58, near "if (-x ""

  (Might be a runaway multi-line "" string starting on line 16)

        (Missing semicolon on previous line?)

syntax error at /usr/share/openldap/migration/migrate_common.ph line 4, near "$DEFAULT_BASE = ""

Compilation failed in require at /usr/share/openldap/migration/migrate_netgroup_byhost.pl line 39.

Preparing LDAP database...

[root@domain15 log]#

Open in new window

0
Comment
Question by:ee024
  • 10
  • 10
20 Comments
 
LVL 7

Expert Comment

by:martin_2110
ID: 24117334
Perhaps your missing a ; on some lines. I would recommend checking each line and making sure you did not delete a semicolon. If that does not work I would grab a fresh copy of migrate_common.ph
0
 

Author Comment

by:ee024
ID: 24117373
but from where i can grab fresh copy?
0
 
LVL 7

Expert Comment

by:martin_2110
ID: 24117394
If it was me i would reinstall the rpm if its an rpm. You might check the lines you edited in the script and make sure they end with a ; My guess is you replaced a default value with your value and neglected  to replace the ; at the end.
0
 

Author Comment

by:ee024
ID: 24117412
i just replaced padl to example see  just changes

example.com";

# Default base
$DEFAULT_BASE = "dc=example,dc=com";

# Turn this on for inetLocalMailReceipient
# sendmail support; add the following to
# sendmail.mc (thanks to Petr@Kristof.CZ):
##### CUT HERE #####
#define(`confLDAP_DEFAULT_SPEC',`-h "ldap.example.com"')dnl
#LDAPROUTE_DOMAIN_FILE(`/etc/mail/ldapdomains')dnl
#FEATURE(ldap_routing)dnl
##### CUT HERE #####
# where /etc/mail/ldapdomains contains names of ldap_routed
# domains (similiar to MASQUERADE_DOMAIN_FILE).
# $DEFAULT_MAIL_HOST = "mail.example.com";

# turn this on to support more general object clases
# such as person.
$EXTENDED_SCHEMA = 0;


0
 

Author Comment

by:ee024
ID: 24117498
i meant just 4 changes
0
 
LVL 7

Expert Comment

by:martin_2110
ID: 24117860
I attached mine with some renaming to example.com
0
 
LVL 7

Expert Comment

by:martin_2110
ID: 24117871
1 more time.
migrate-common.ph.txt
0
 

Author Comment

by:ee024
ID: 24118059
Thanks but needed migrate_all_offline.sh
0
 
LVL 7

Expert Comment

by:martin_2110
ID: 24118311
I dont think you need it, it is a perl script  your errors look like perl. Here ya go.
migrate-all-offline.sh.txt
0
 
LVL 7

Expert Comment

by:martin_2110
ID: 24118328
What I meant to say...
I dont think you need it, it is a shell script  your errors look like perl. Here ya go
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:ee024
ID: 24121215
after reinstalling all packages it gives me new error
=> bdb_tool_entry_put: id2entry_add failed: DB_KEYEXIST: Key/data pair already exists (-30996)
=> bdb_tool_entry_put: txn_aborted! DB_KEYEXIST: Key/data pair already exists (-30996)
slapadd: could not add entry dn="cn=echo,ou=Services,dc=example,dc=com" (line=2917): txn_aborted! DB_KEYEXIST: Key/data pair already exists (-30996)
Migration failed: saving failed LDIF to /tmp/nis.ldif.GA3258


pls help me out

Thanks
0
 

Author Comment

by:ee024
ID: 24121430
Now somehow its working even after above error i have setup autofs on client so that it can automatically get his/her home dir  automatically but even after mounting all home dir of LDAP server only ldapuser can login which was created during ldap setup.
I  have used updatedb command restarted ldap and run migrate_all_offline.ph again but still only this user can login i wonder y only this user getting login?
0
 
LVL 7

Expert Comment

by:martin_2110
ID: 24123560
Are the users in the database, what happens when you run slapcat on the server.
What are the perminsions on ldap database, ldap user should be able write to all all the files in /var/lib/ldap
When you run getent passwd on the client do you see users you created?

0
 

Author Comment

by:ee024
ID: 24123644
output of slapcat is attached i dont know what it really means and permission are as follows
[root@domain15 ~]# ls -al /var/lib/ldap/
total 772
drwx------  3 ldap ldap     4096 Nov  6 13:27 .
drwxr-xr-x 29 root root     4096 Apr 10 21:59 ..
-rw-r--r--  1 ldap ldap     2048 Apr 10 22:13 alock
-rw-------  1 ldap ldap    24576 Apr 10 22:13 __db.001
-rw-------  1 ldap ldap   278528 Apr 10 22:13 __db.002
-rw-------  1 ldap ldap   270336 Apr 10 22:13 __db.003
-rw-------  1 ldap ldap    98304 Apr 10 22:13 __db.004
-rw-------  1 ldap ldap   352256 Apr 10 22:13 __db.005
-rw-------  1 ldap ldap    24576 Apr 10 22:13 __db.006
-rw-------  1 ldap ldap     8192 Apr 10 22:13 dn2id.bdb
drwxr-xr-x  2 ldap ldap     4096 Apr 11 13:36 example.com
-rw-------  1 ldap ldap    32768 Apr 10 22:13 id2entry.bdb
-rw-------  1 ldap ldap 10485760 Apr 10 22:13 log.0000000001
-rw-r--r--  1 ldap ldap      212 Apr 11 13:36 openldap-severs-update.log
[root@domain15 ~]#


when i run getent passwd command on  client i can see ldapuser there and other local users on client systems not others from server.


Thanks for being with me
0
 
LVL 7

Accepted Solution

by:
martin_2110 earned 60 total points
ID: 24123746
try this on the server it will backup then empty the ldap database
shutdown ldap
cp -rvp /var/lib/ldap /var/lib/ldap.backup
rm -rf /var/lib/ldap/*
cp -p /var/lib/ldap.backup/DB_CONFIG /var/lib/ldap/
startup ldap

then rerun your import
0
 

Author Comment

by:ee024
ID: 24123824
what import  do u mean to rerun migrate_all_offline.sh ?
0
 
LVL 7

Expert Comment

by:martin_2110
ID: 24123891
yea.
0
 

Author Comment

by:ee024
ID: 24123980
Now all users can login...good...:-) i wonder y its not dynamic its really painful to run everything again and again is there any solution for this?
0
 
LVL 7

Expert Comment

by:martin_2110
ID: 24124027
It is a migration script not a add user script. It is meant to be used once.
I use this to manage users.
http://lam.sourceforge.net/

I also use the attached script to add users sometimes. Make sure to replace ldapserver with your server.
#!/bin/bash

if [[ -z "$1" ]] ; then

    echo "usage: $0 username"

    exit 1

fi
 

LDAPSERVER=ldapserver
 

adduser $1

passwd $1

grep $1 /etc/passwd > /tmp/changeldappasswd.tmp

/usr/share/openldap/migration/migrate_passwd.pl /tmp/changeldappasswd.tmp /tmp/changeldappasswd.ldif.tmp

cat /tmp/changeldappasswd.ldif.tmp | sed s/dc=padl,dc=com/dc=example,dc=com/ > /tmp/changeldappasswd.ldif

echo >> /tmp/changeldappasswd.ldif

grep $1 /etc/group > /tmp/changeldappasswd.tmp

/usr/share/openldap/migration/migrate_group.pl /tmp/changeldappasswd.tmp /tmp/changeldappasswd.ldif.tmp

cat /tmp/changeldappasswd.ldif.tmp | sed s/dc=padl,dc=com/dc=example,dc=com/ >> /tmp/changeldappasswd.ldif
 

userdel $1

ldapadd -x -D "cn=Manager,dc=example,dc=com" -W -f /tmp/changeldappasswd.ldif -H ldap://$LDAPSERVER

rm -f /tmp/changeldappasswd.*

Open in new window

0
 

Author Comment

by:ee024
ID: 24124040
Thanks martin for everything.Have a good day :-)
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now