Link to home
Start Free TrialLog in
Avatar of ee024
ee024

asked on

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

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

Avatar of martin_2110
martin_2110
Flag of United States of America image

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
Avatar of ee024
ee024

ASKER

but from where i can grab fresh copy?
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.
Avatar of ee024

ASKER

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;


Avatar of ee024

ASKER

i meant just 4 changes
I attached mine with some renaming to example.com
Avatar of ee024

ASKER

Thanks but needed migrate_all_offline.sh
I dont think you need it, it is a perl script  your errors look like perl. Here ya go.
migrate-all-offline.sh.txt
What I meant to say...
I dont think you need it, it is a shell script  your errors look like perl. Here ya go
Avatar of ee024

ASKER

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
Avatar of ee024

ASKER

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?
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?

Avatar of ee024

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of martin_2110
martin_2110
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ee024

ASKER

what import  do u mean to rerun migrate_all_offline.sh ?
Avatar of ee024

ASKER

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?
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

Avatar of ee024

ASKER

Thanks martin for everything.Have a good day :-)