Skip to content

Instantly share code, notes, and snippets.

@hiroyuki-sato
Last active December 11, 2015 07:08
Show Gist options
  • Save hiroyuki-sato/4564166 to your computer and use it in GitHub Desktop.
Save hiroyuki-sato/4564166 to your computer and use it in GitHub Desktop.

ssoadm Batch Example

Command

# ${SSOADM} do-batch -u amadmin -f ${PWDFILE}  -Z ${BATCH_FILE} --batchstatus ${BATCH_OUTPUT_FILE} 

Realm was created.

Attribute values were set.

Datastore profile was updated.

Authentication Instance was updated.

Batch File

Basically you just remove -u and -f option from your commands.

% cat ${BATCH_FILE}

create-realm --realm company4.com
set-realm-attrs --realm /company4.com -s sunIdentityRepositoryService --attributevalues sunOrganizationAliases=sunOrganizationAliases.company4.com
update-datastore -e /company4.com -m OpenDJ -D datastore_profiles.txt
update-auth-instance -m LDAP -e /company4.com -D authentication_parameters.txt

datastore_profiles.txt

sun-idrepo-ldapv3-config-authid=cn=Manager,dc=example4,dc=com
sun-idrepo-ldapv3-config-users-search-filter=(objectclass=inetorgperson)
sun-idrepo-ldapv3-config-people-container-value=users
sun-idrepo-ldapv3-config-ldap-server=your_ldap.server.com:636
sun-idrepo-ldapv3-config-organization_name=dc=example4,dc=com
sun-idrepo-ldapv3-config-ssl-enabled=true
sun-idrepo-ldapv3-config-authpw=*PLANTEXT_PASSWORD*
sun-idrepo-ldapv3-config-psearchbase=

How to know parameter names

${SSOADM} show-datastore  -u amadmin -f ${PWDFILE}  -e /company4.com -m OpenDJ

sun-idrepo-ldapv3-config-errorcodes=91
sun-idrepo-ldapv3-config-errorcodes=80
sun-idrepo-ldapv3-config-errorcodes=81
sun-idrepo-ldapv3-config-idletimeout=0
sun-idrepo-ldapv3-config-time-limit=10
sun-idrepo-ldapv3-config-group-attributes=cn
sun-idrepo-ldapv3-config-group-attributes=dn
.........................
.........................

authentication_parameters.txt

iplanet-am-auth-ldap-ssl-enabled=true
iplanet-am-auth-ldap-return-user-dn=true
iplanet-am-auth-ldap-base-dn=ou=dc=example4,dc=com
iplanet-am-auth-ldap-server=your_ldap.server.com:636
iplanet-am-auth-ldap-user-naming-attribute=uid
iplanet-am-auth-ldap-auth-level=0
iplanet-am-auth-ldap-bind-passwd=*PLANTEXT_PASSWORD*
iplanet-am-auth-ldap-ssl-trust-all=false
iplanet-am-auth-ldap-user-search-attributes=uid
iplanet-am-auth-ldap-behera-password-policy-enabled=true
iplanet-am-auth-ldap-bind-dn=cn=Manager,dc=example4,dc=com

How to know parameter names

# ${SSOADM} get-auth-instance -u amadmin -f ${PWDFILE} -m LDAP -e /company3.com 

Authentication Instance profile:
iplanet-am-auth-ldap-ssl-enabled=true
iplanet-am-auth-ldap-return-user-dn=true
iplanet-am-ldap-user-creation-attr-list=
iplanet-am-auth-ldap-bind-passwd=********
iplanet-am-auth-ldap-ssl-trust-all=false
iplanet-am-auth-ldap-search-scope=SUBTREE
iplanet-am-auth-ldap-search-filter=
iplanet-am-auth-ldap-user-search-attributes=uid
iplanet-am-auth-ldap-behera-password-policy-enabled=true
iplanet-am-auth-ldap-min-password-length=8
iplanet-am-auth-ldap-server-check=15
......................
......................

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment