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

Re: Really confusing responses (was: Re: Can't slapadd ldif file)



Todd Lyons wrote:
OK, the first one is relatively simple. In order to make the migrate_all script finish successfully I have to comment out the two lines where it 'imports' the 'protocols.' If I don't, I get:

Yes, the + signs create havoc. I don't import much more than users and groups. The rest of that crap I leave in files.

Yeah, I guess I don't need 'protocols' in there.. =)

First if you don't have this, add it:
if [ "X$ETC_SHADOW" = "X" ]; then
        ETC_SHADOW=/etc/shadow
fi

Then find the line that looks roughly like this in migrate_all_online.sh:
echo "Migrating users..."
$PERL -I${INSTDIR} ${INSTDIR}migrate_passwd.pl          $ETC_PASSWD >> $DB

And make it look like:
echo "Migrating users..."
export ETC_SHADOW
$PERL -I${INSTDIR} ${INSTDIR}migrate_passwd.pl          $ETC_PASSWD >> $DB

Because in migrate_passwd.pl is this snippet of code:
    open(SHADOW, $ENV{ETC_SHADOW}) || return;

Perhaps in yours... in my migrate_passwd.pl is:

        open(SHADOW, "/etc/shadow") || return;

And if I run migrate_passwd it from the command line, I see the crypts of the password. But for some reason when I run migrate_all_online, they don't get added. I did try adding the lines you suggest as well, just in case... still no cigar.

Is the ldap server still running?  If so, stop it.  Then slapcat should
work.  Never run slap* utilities while the ldap server process is
running.

Ah. Good to know

First guess is that if you ran the offline tools, you were doing it as
root and all of the resulting files are owned by root so the ldap server
(which normally runs as user ldap) can't open them properly.

No, then ldapsearch wouldn't work. I think it was what you said before... you're not supposed to run slap* stuff when the server is running


--
Phil Dibowitz                             phil@ipom.com
Freeware and Technical Pages              Insanity Palace of Metallica
http://home.earthlink.net/~jaymzh666/     http://www.ipom.com/

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
 - Benjamin Franklin, 1759