From 5a168a0da2302f900c64b236862691b49de08869 Mon Sep 17 00:00:00 2001
From: Mark Craig <mark.craig@forgerock.com>
Date: Tue, 18 Oct 2011 16:29:09 +0000
Subject: [PATCH] Fix for OPENDJ-319: Replace short options with long options throughout examples in the documentation

---
 opendj3/src/main/docbkx/admin-guide/chap-pta.xml |  105 ++++++++++++++++++++++++++++++++--------------------
 1 files changed, 65 insertions(+), 40 deletions(-)

diff --git a/opendj3/src/main/docbkx/admin-guide/chap-pta.xml b/opendj3/src/main/docbkx/admin-guide/chap-pta.xml
index 0fad51e..0f69522 100644
--- a/opendj3/src/main/docbkx/admin-guide/chap-pta.xml
+++ b/opendj3/src/main/docbkx/admin-guide/chap-pta.xml
@@ -170,11 +170,11 @@
     <para>Set up an authentication policy for pass through
     authentication to the authentication server.</para>
     <screen>$ dsconfig
- -p 4444
- -h `hostname`
- -D "cn=directory manager"
- -w password
  create-password-policy
+ --port 4444
+ --hostname `hostname`
+ --bindDN "cn=Directory Manager"
+ --bindPassword password
  --type ldap-pass-through
  --policy-name "PTA Policy"
  --set primary-remote-ldap-server:pta-server.example.com:636
@@ -183,7 +183,8 @@
  --set mapping-policy:mapped-search
  --set use-ssl:true
  --set trust-manager-provider:JKS
- -X -n</screen>
+ --trustAll
+ --no-prompt</screen>
     <para>The policy shown here maps identities under
     <literal>dc=example,dc=com</literal> to identities under
     <literal>dc=PTA Server,dc=com</literal>, where users have the same
@@ -193,11 +194,11 @@
    <step>
     <para>Check that your policy has been added to the list.</para>
     <screen>$ dsconfig
- -p 4444
- -h `hostname`
- -D "cn=directory manager"
- -w password
  list-password-policies
+ --port 4444
+ --hostname `hostname`
+ --bindDN "cn=Directory Manager"
+ --bindPassword password
  --property use-ssl
 
 Password Policy         : Type              : use-ssl
@@ -233,13 +234,21 @@
    enable the user with <literal>cn=LDAP PTA User</literal> on OpenDJ
    authenticate through to Active Directory.</para>
    
-   <screen>$ ldapsearch -h opendj.example.com -b dc=example,dc=com uid=ldapptauser cn
+   <screen>$ ldapsearch
+ --hostname opendj.example.com
+ --baseDN dc=example,dc=com
+ uid=ldapptauser
+ cn
 dn: uid=ldapptauser,ou=People,dc=example,dc=com
 cn: LDAP PTA User
 
-$ ldapsearch -h ad.example.com -b "CN=Users,DC=internal,DC=forgerock,DC=com"
- -D "cn=administrator,cn=Users,DC=internal,DC=forgerock,DC=com" -w password
- "(cn=LDAP PTA User)" cn
+$ ldapsearch
+ --hostname ad.example.com
+ --baseDN "CN=Users,DC=internal,DC=forgerock,DC=com"
+ --bindDN "cn=administrator,cn=Users,DC=internal,DC=forgerock,DC=com"
+ --bindPassword password
+ "(cn=LDAP PTA User)"
+ cn
 dn: CN=LDAP PTA User,CN=Users,DC=internal,DC=forgerock,DC=com
 cn: LDAP PTA User</screen>
    
@@ -334,11 +343,11 @@
     <para>Set up an authentication policy for OpenDJ users to authenticate
     to Active Directory.</para>
     <screen>$ dsconfig
- -p 4444
- -h `hostname`
- -D "cn=Directory Manager"
- -w password
  create-password-policy
+ --port 4444
+ --hostname `hostname`
+ --bindDN "cn=Directory Manager"
+ --bindPassword password
  --type ldap-pass-through
  --policy-name "AD PTA Policy"
  --set primary-remote-ldap-server:ad.example.com:636
@@ -350,11 +359,14 @@
  --set mapping-policy:mapped-search
  --set trust-manager-provider:JKS
  --set use-ssl:true
- -X -n</screen>
+ --trustAll --no-prompt</screen>
    </step>
    <step>
     <para>Assign the authentication policy to a test user.</para>
-    <screen>$ ldapmodify -p 1389 -D "cn=Directory Manager" -w password
+    <screen>$ ldapmodify
+ --port 1389
+ --bindDN "cn=Directory Manager"
+ --bindPassword password
 dn: uid=ldapptauser,ou=People,dc=example,dc=com
 changetype: modify
 add: ds-pwp-password-policy-dn
@@ -367,11 +379,11 @@
     <para>Check that the user can bind using pass through authentication to
     Active Directory.</para>
     <screen>$ ldapsearch
- -h opendj.example.com
- -p 1389
- -b dc=example,dc=com
- -D uid=ldapptauser,ou=People,dc=example,dc=com
- -w password
+ --hostname opendj.example.com
+ --port 1389
+ --baseDN dc=example,dc=com
+ --bindDN uid=ldapptauser,ou=People,dc=example,dc=com
+ --bindPassword password
  "(cn=LDAP PTA User)"
  userpassword cn
 dn: uid=ldapptauser,ou=People,dc=example,dc=com
@@ -397,8 +409,8 @@
    authentication policy does not have a value for the operational attribute
    <literal>pwdPolicySubentry</literal>.</para>
    <screen>$ ldapsearch
- -p 1389
- -b dc=example,dc=com
+ --port 1389
+ --baseDN dc=example,dc=com
  uid=user.0
  pwdPolicySubentry
 dn: uid=user.0,ou=People,dc=example,dc=com
@@ -455,14 +467,21 @@
  "ds-pwp-password-policy-dn")(version 3.0;acl "Cannot choose own pass
  word policy";deny (write)(userdn = "ldap:///self");)
 
-$ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -f protect-pta.ldif
+$ ldapmodify
+ --port 1389
+ --bindDN "cn=Directory Manager"
+ --bindPassword password
+ --filename protect-pta.ldif
 Processing MODIFY request for ou=People,dc=example,dc=com
 MODIFY operation successful for DN ou=People,dc=example,dc=com</screen>
    </step>
    <step>
     <para>Update the user's <literal>ds-pwp-password-policy-dn</literal>
     attribute.</para>
-    <screen>$ ldapmodify -p 1389 -D "cn=Directory Manager" -w password
+    <screen>$ ldapmodify
+ --port 1389
+ --bindDN "cn=Directory Manager"
+ --bindPassword password
 dn: uid=user.0,ou=People,dc=example,dc=com
 changetype: modify 
 add: ds-pwp-password-policy-dn
@@ -475,9 +494,10 @@
     <para>Check that the user can authenticate through to the authentication
     server.</para>
     <screen>$ ldapsearch
- -p 1389
- -b dc=example,dc=com
- -D uid=user.0,ou=People,dc=example,dc=com -w password
+ --port 1389
+ --baseDN dc=example,dc=com
+ --bindDN uid=user.0,ou=People,dc=example,dc=com
+ --bindPassword password
  uid=user.0
  cn sn
 dn: uid=user.0,ou=People,dc=example,dc=com
@@ -512,7 +532,12 @@
 subtreeSpecification: { base "ou=People", specificationFilter "(isMemberOf=
  cn=Directory Administrators,ou=Groups,dc=example,dc=com)"}
 
-$ ldapmodify -p 1389 -D "cn=Directory Manager" -w password -a -f pta-coll.ldif
+$ ldapmodify
+ --port 1389
+ --bindDN "cn=Directory Manager"
+ --bindPassword password
+ --defaultAdd
+ --filename pta-coll.ldif
 Processing ADD request for cn=PTA Policy for Dir Admins,dc=example,dc=com
 ADD operation successful for DN cn=PTA Policy for Dir Admins,dc=example,dc=com</screen>
    </step>
@@ -523,10 +548,10 @@
       <para>Make sure you can bind as the user on the authentication
       server.</para>
       <screen>$ ldapsearch
- -p 2389
- -D "uid=kvaughan,ou=People,dc=PTA Server,dc=com"
- -w password
- -b "dc=PTA Server,dc=com"
+ --port 2389
+ --bindDN "uid=kvaughan,ou=People,dc=PTA Server,dc=com"
+ --bindPassword password
+ --baseDN "dc=PTA Server,dc=com"
  uid=kvaughan
 dn: uid=kvaughan,ou=People,dc=PTA Server,dc=com
 objectClass: person
@@ -546,10 +571,10 @@
       <para>Check that the user can authenticate through to the authentication
       server from OpenDJ.</para>
       <screen>$ ldapsearch
- -p 1389
- -D "uid=kvaughan,ou=People,dc=example,dc=com"
- -w password
- -b dc=example,dc=com
+ --port 1389
+ --bindDN "uid=kvaughan,ou=people,dc=example,dc=com"
+ --bindPassword password
+ --baseDN dc=example,dc=com
  uid=kvaughan
  cn sn
 dn: uid=kvaughan,ou=People,dc=example,dc=com

--
Gitblit v1.10.0