WrenSecurity / wrends

Community fork of OpenDJ, an LDAP server originally developed by ForgeRock.
http://wrensecurity.org
Other
37 stars 17 forks source link

Calling DS status returns exit code 6 #65

Closed minnoroth closed 1 year ago

minnoroth commented 1 year ago

When calling for status of DS i'm getting an exit code 6 as a return.

./status -ns

Server Run Status: Started
Open Connections: 0
Host Name: <hostname>
Administrative Users: cn=Directory Manager
Installation Path:
<installation path>/wrends/opendj-server-legacy/target/package/wrends
Version: Wren:DS Server 4.0.0-RC2-SNAPSHOT
Java Version: <not available> (*)
Administration Connector: Port 4444 (LDAPS)

Address:Port: --
Protocol: LDIF
State: Disabled

Address:Port: 0.0.0.0:636
Protocol: LDAPS
State: Disabled

Address:Port: 0.0.0.0:1389
Protocol: LDAP
State: Enabled

Address:Port: 0.0.0.0:1689
Protocol: JMX
State: Disabled

Address:Port: 0.0.0.0:8080
Protocol: HTTP
State: Disabled

Base DN:     dc=example,dc=com
Backend ID:  userRoot
Entries:     <not available> (*)
Replication:

Get exit code in bash: echo $? 6

minnoroth commented 1 year ago

After looking into the code I found that it's a feature: https://github.com/WrenSecurity/wrends/blob/f365f131bc9c17fb2dd9e1ea2d080e498311e9da/opendj-server-legacy/src/main/java/org/opends/server/tools/status/StatusCli.java#L333

User needs to provide credentials in order to get exit code 0: ./status -ns -D "cn=Directory Manager -w "password"

pavelhoral commented 1 year ago

I guess we can close this as invalid issue. Would be nice to have documentation with this information, but that should be handled separately.