Bug 918718

Summary: Behaviours of "db2ldif -a <filename>" and "db2ldif.pl -a <filename>" are inconsistent
Product: Red Hat Enterprise Linux 7 Reporter: Nathan Kinder <nkinder>
Component: 389-ds-baseAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: Sankar Ramalingam <sramling>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.0CC: amsharma, jgalipea, mkubik, nhosoi, vashirov
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.1.2-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 10:37:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nathan Kinder 2013-03-06 18:17:15 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/585

Assuming <filename> is not a full path,
1) db2ldif -a <filename> tries to create the file in /usr/sbin, which usually fails since the server user ("nobody" by default) does not have the right to write in /usr/sbin.
2) db2ldif.pl -a <filename> creates the file in the log directory /var/log/dirsrv/slapd-ID, which is not expected.

The exported file is supposed to be placed in the current directory where the command-line is executed if "-a <filename>" is specified.

Thanks to Asha for reporting the bug.

Comment 1 Rich Megginson 2013-10-01 23:25:08 UTC
moving all ON_QA bugs to MODIFIED in order to add them to the errata (can't add bugs in the ON_QA state to an errata).  When the errata is created, the bugs should be automatically moved back to ON_QA.

Comment 3 Amita Sharma 2014-01-09 11:57:37 UTC
[root@dhcp201-149 export]# ls -al export1.ldif
-rwxr-xr-x. 1 root root 0 Jan  9 17:03 export1.ldif

[root@dhcp201-149 export]# db2ldif.pl -D "cn=Directory Manager" -w Secret123 -Z slapd-dhcp201-149 -n userRoot -a export1.ldif
Exporting to ldif file: /export/export1.ldif
Successfully added task entry "cn=export_2014_1_9_17_5_52, cn=export, cn=tasks, cn=config"

[root@dhcp201-149 export]#  db2ldif -Z slapd-dhcp201-149 -n userRoot -a exported.ldif
Exported ldif file: /export/exported.ldif
ldiffile: /export/exported.ldif
[09/Jan/2014:17:02:26 +051800] - export userRoot: Processed 9 entries (100%).
[09/Jan/2014:17:02:26 +051800] - All database threads now stopped


[root@dhcp201-149 export]# rpm -qa | grep 389
389-adminutil-1.1.15-3.fc19.1.x86_64
389-console-1.1.7-4.fc19.noarch
389-ds-base-libs-1.3.1.6-14.el7.x86_64
389-ds-base-1.3.1.6-14.el7.x86_64
[root@dhcp201-149 export]# 

Hence marking bug as VERIFIED.

Comment 5 Ludek Smid 2014-06-13 10:37:13 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.