Bug 201540 - OpenLDAP migration script creates duplicate entries from NIS server
OpenLDAP migration script creates duplicate entries from NIS server
Product: Fedora
Classification: Fedora
Component: openldap (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Safranek
: 188056 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2006-08-07 04:40 EDT by Daniel Qarras
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: openldap-2.3.34-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-19 10:22:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Qarras 2006-08-07 04:40:27 EDT
migrate_all_nis_*line.sh creates duplicate entries in some cases because of the
NIS maps used with ypcat in the scripts. This can be fixed by changing the

  ypcat $DOMFLAG hosts ... -> ypcat $DOMFLAG hosts.byaddr ...
  ypcat $DOMFLAG rpc.byname ... -> ypcat $DOMFLAG rpc.bynumber ...

The latter maps give always only one entry. The currently used maps give errors
like the following:

adding new entry "cn=testmachine.intranet,ou=Hosts,dc=intranet"
ldap_add: Already exists (68)

/usr/bin/ldapadd: returned non-zero exit status: saving failed LDIF to

And this causes the whole migration to fail.

On a related note, be default there is no file /etc/networks in a RHEL/Fedora
installation and no networks map is built on a NIS server so the following line
in the migration script causes a warning when running the script, perhaps it
could be made conditional to prevent the warning:

  ypcat $DOMFLAG networks

Please fix at least the duplicate entry problem.
Comment 1 Daniel Qarras 2006-09-20 16:22:05 EDT
So, what's the status with this?
Comment 2 Daniel Qarras 2007-04-21 09:24:45 EDT
Any news on this one?
Comment 3 Jan Safranek 2007-05-24 05:19:13 EDT
*** Bug 188056 has been marked as a duplicate of this bug. ***
Comment 4 Jan Safranek 2007-05-24 05:36:12 EDT
I am sorry for long time of silence - I'm new maintainer of openldap and I'm
slowly going through the old bugs... This will be fixed soon in rawhide (after
Fedora7 gets out).
Comment 5 Sitsofe Wheeler 2007-05-24 18:25:14 EDT
Why the forward rather than backward dupe?
Comment 6 Jan Safranek 2007-05-25 05:52:14 EDT
If I underestand your question correctly, you are asking why I am going to fix
it in rawhide rather than FC5/6/7? Basically because this is not an
security/important issue and the workaround is available. Maybe it will get back
to Fedoras with some other updates, when there will be enough of them.
Comment 7 Sitsofe Wheeler 2007-05-25 17:17:17 EDT
Not quite. Why not mark the rawhide bug as a dup of this one and then mark this
one against rawhide?
Comment 8 Jan Safranek 2007-05-28 03:33:48 EDT
What rawhide bug are you referring to? AFAIK there is no open bug on devel
regarding migration tools and NIS.
Comment 9 Sitsofe Wheeler 2007-05-28 11:34:41 EDT
You're right. I must have been confused this one's status with another bug I was
looking at. But since this bug is against exactly the same version of FC as 
188056 it feels like there wasn't any real reason in duplicating forward rather
than back (I think I'll let the issue lie now - in the grand scheme of things so
long as the bug is fixed it doesn't matter).
Comment 10 Jan Safranek 2007-06-08 07:54:36 EDT
Fixed in openldap-2.3.34-3.fc8
Comment 11 Jan Safranek 2007-10-19 10:22:58 EDT
I do not think I will collect enough important fixed to release it in FC6, so
it's fixed only in rawhide (F8 soon) and F7.

Note You need to log in before you can comment on or make changes to this bug.