Skip to content

Commit

Permalink
Update OpenLDAP clients to use -H option
Browse files Browse the repository at this point in the history
The latest OpenLDAP clients no longer have the -h option so the
the docs and tests have been updated to use the -H option instead.
  • Loading branch information
edewata committed Jun 8, 2022
1 parent f7c831e commit 24a0f68
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions docs/admin/acme/Managing_DS_Realm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
To add a user, execute the following command:

----
$ ldapadd -h $HOSTNAME -D "cn=Directory Manager" -w Secret.123 << EOF
$ ldapadd -H ldap://$HOSTNAME -D "cn=Directory Manager" -w Secret.123 << EOF
dn: uid=admin,ou=people,dc=acme,dc=pki,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
Expand All @@ -21,7 +21,7 @@ EOF
To enable authentication using a password, execute the following command:

----
$ ldapmodify -h $HOSTNAME -D "cn=Directory Manager" -w Secret.123 << EOF
$ ldapmodify -H ldap://$HOSTNAME -D "cn=Directory Manager" -w Secret.123 << EOF
dn: uid=admin,ou=people,dc=acme,dc=pki,dc=example,dc=com
changetype: modify
replace: userPassword
Expand All @@ -46,7 +46,7 @@ $ certutil -L -d ~/.dogtag/nssdb -n admin -r | base64 -w 0
Then add the certificate with the following command:

----
$ ldapmodify -h $HOSTNAME -D "cn=Directory Manager" -w Secret.123 << EOF
$ ldapmodify -H ldap://$HOSTNAME -D "cn=Directory Manager" -w Secret.123 << EOF
dn: uid=admin,ou=people,dc=acme,dc=pki,dc=example,dc=com
changetype: modify
add: description
Expand All @@ -63,7 +63,7 @@ EOF
To add a group, execute the following command:

----
$ ldapadd -h $HOSTNAME -D "cn=Directory Manager" -w Secret.123 << EOF
$ ldapadd -H ldap://$HOSTNAME -D "cn=Directory Manager" -w Secret.123 << EOF
dn: cn=Administrators,ou=groups,dc=acme,dc=pki,dc=example,dc=com
objectClass: groupOfUniqueNames
cn: Administrators
Expand All @@ -76,7 +76,7 @@ EOF
To add a group member, execute the following command:

----
$ ldapmodify -h $HOSTNAME -D "cn=Directory Manager" -w Secret.123 << EOF
$ ldapmodify -H ldap://$HOSTNAME -D "cn=Directory Manager" -w Secret.123 << EOF
dn: cn=Administrators,ou=groups,dc=acme,dc=pki,dc=example,dc=com
changetype: modify
add: uniqueMember
Expand Down
10 changes: 5 additions & 5 deletions docs/installation/acme/Configuring-ACME-with-DS-Database.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ First, add the ACME DS schema by importing
link:../../../base/acme/database/ds/schema.ldif[/usr/share/pki/acme/database/ds/schema.ldif] with the following command:

----
$ ldapmodify -h $HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 \
$ ldapmodify -H ldap://$HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 \
-f /usr/share/pki/acme/database/ds/schema.ldif
----

Next, create the ACME DS indexes by importing
link:../../../base/acme/database/ds/index.ldif[/usr/share/pki/acme/database/ds/index.ldif] with the following command:

----
$ ldapadd -h $HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 \
$ ldapadd -H ldap://$HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 \
-f /usr/share/pki/acme/database/ds/index.ldif
----

Expand All @@ -30,22 +30,22 @@ If necessary, the database can be reindexed by importing
link:../../../base/acme/database/ds/indextask.ldif[/usr/share/pki/acme/database/ds/indextask.ldif] with the following command:

----
$ ldapadd -h $HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 \
$ ldapadd -H ldap://$HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 \
-f /usr/share/pki/acme/database/ds/indextask.ldif
----

The progress of the reindex task can be monitored with the following command:

----
$ ldapsearch -h $HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 \
$ ldapsearch -H ldap://$HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 \
-b "cn=acme,cn=index,cn=tasks,cn=config"
----

Once the indexes are ready, create the ACME subtree by importing
link:../../../base/acme/database/ds/create.ldif[/usr/share/pki/acme/database/ds/create.ldif] with the following command:

----
$ ldapadd -h $HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 \
$ ldapadd -H ldap://$HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 \
-f /usr/share/pki/acme/database/ds/create.ldif
----

Expand Down
2 changes: 1 addition & 1 deletion docs/installation/acme/Configuring-ACME-with-DS-Realm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This example uses `dc=acme,dc=pki,dc=example,dc=com` as the base DN.
Import the file with the following command:

----
$ ldapadd -h $HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 \
$ ldapadd -H ldap://$HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 \
-f /usr/share/pki/acme/realm/ds/create.ldif
----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This example uses `dc=acme,dc=pki,dc=example,dc=com` as the base DN.
Import the file with the following command:

----
$ ldapadd -h $HOSTNAME -x -D "cn=Manager,dc=example,dc=com" -w Secret.123 \
$ ldapadd -H ldap://$HOSTNAME -x -D "cn=Manager,dc=example,dc=com" -w Secret.123 \
-f /usr/share/pki/acme/database/openldap/create.ldif
----

Expand Down
2 changes: 1 addition & 1 deletion docs/upgrade/v10.5/Upgrading_PKI_Database.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ caIssuerDN="cn=CA Signing Certificate,ou=pki-tomcat,o=host.com Security Domain"
port=389
hostname="localhost.localdomain"
ldapmodify -a -D "$userdn" -W -p $port -h $hostname -x << EOF
ldapmodify-H ldap://$hostname:$port -x -D "$userdn" -W -a << EOF
dn: cn=allRevokedCertsByIssuer-$instanceId, cn=$database, cn=ldbm database, cn=plugins, cn=config
objectClass: top
objectClass: vlvSearch
Expand Down
2 changes: 1 addition & 1 deletion tests/bin/ds-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sed -i \

dscreate from-file ds.inf

ldapadd -h $HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 << EOF
ldapadd -H ldap://$HOSTNAME -x -D "cn=Directory Manager" -w Secret.123 << EOF
dn: dc=example,dc=com
objectClass: domain
dc: example
Expand Down

0 comments on commit 24a0f68

Please sign in to comment.