#50025 dsconf prints output to stderr instead of stdout
Closed: wontfix 3 years ago Opened 3 years ago by mmuehlfeldrh.

Issue Description

dsconf prints its output to stderr instead of stdout. This requires to redirect the output if you want to pipe the output through other commands.

Package Version and Platform

389-ds-base-1.4.0.18-20181105git534fad1c6.fc28.x86_64

Steps to reproduce

Using, for example, "grep" to filter a string in the dsconf output does not work if you don't redirect stderr to stdout:

# dsconf -D "cn=Directory Manager" ldap://server.example.com replication get --suffix="dc=example,dc=com" | grep -i nsds5replicaid
Enter password for cn=Directory Manager on ldap://server.example.com: 
dn: cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config
cn: replica
nsDS5Flags: 1
nsDS5ReplicaBindDN: cn=replication manager,cn=config
nsDS5ReplicaId: 1
nsDS5ReplicaName: fc2d2c03-e73211e8-9eb7d5ab-68510d27
nsDS5ReplicaRoot: dc=example,dc=com
nsDS5ReplicaType: 3
nsState:: AQAAAAAAAAD2rupbAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAA==
nsds5ReplicaChangeCount: 1
nsds5replicareapactive: 0
objectClass: top
objectClass: nsds5Replica

However, if you redirect stderr to stdout (2>&1), it works:

# dsconf -D "cn=Directory Manager" ldap://server.example.com replication get --suffix="dc=example,dc=com" 2>&1 | grep -i nsds5replicaid
Enter password for cn=Directory Manager on ldap://server.example.com: 
nsDS5ReplicaId: 1

Metadata Update from @mreynolds:
- Custom field component adjusted to None
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None
- Custom field type adjusted to None
- Custom field version adjusted to None
- Issue set to the milestone: 1.4.0

3 years ago

Metadata Update from @mreynolds:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

3 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/3084

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: fixed)

2 years ago

Login to comment on this ticket.

Metadata