#!/bin/sh

# Copyright  2004 Sun Microsystems, Inc. All rights reserved. 
# 
# Sun Microsystems, Inc. has intellectual property rights relating to
# technology embodied in the product that is described in this document.
# In particular, and without limitation, these intellectual property rights
# may include one or more of the U.S. patents listed at
# http://www.sun.com/patents and one or more additional patents or pending
# patent applications in the U.S. and in other countries.
# 
# U.S. Government Rights - Commercial software. Government users are subject
# to the Sun Microsystems, Inc. standard license agreement and applicable
# provisions of the FAR and its supplements.
# 
# Use is subject to license terms. 
# 
# This distribution may include materials developed by third parties. Sun,
# Sun Microsystems, the Sun logo, Java and Sun[tm] ONE are trademarks or
# registered trademarks of Sun Microsystems, Inc. in the U.S. and other
# countries. 
# 
# Copyright  2004 Sun Microsystems, Inc. Tous droits rservs. Sun
# Microsystems, Inc. dtient les droits de proprit intellectuels relatifs
#  la technologie incorpore dans le produit qui est dcrit dans ce document.
# En particulier, et ce sans limitation, ces droits de proprit
# intellectuelle peuvent inclure un ou plus des brevets amricains lists
#  l'adresse http://www.sun.com/patents et un ou les brevets supplmentaires
# ou les applications de brevet en attente aux Etats - Unis et dans les
# autres pays.
# 
# L'utilisation est soumise aux termes du contrat de licence.
# 
# Cette distribution peut comprendre des composants dvelopps par des
# tierces parties.
# 
# Sun, Sun Microsystems, le logo Sun, Java et Sun[tm] ONE sont des marques
# de fabrique ou des marques dposes de Sun Microsystems, Inc. aux
# Etats-Unis et dans d'autres pays.


if [ $# -le 1 ]
then
        echo "Usage: $0 DN Password"
        exit
fi

ADMIN_CLI=BASEDIR/PRODUCT_DIR/bin/amadmin

    $ADMIN_CLI --runasdn "$1" --password "$2" --schema IS_INSTALL_ETCDIR/IS_PRODNAME/config/ums/ums.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAdminConsole.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAgent.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAuth.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAuthAnonymous.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAuthCert.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAuthConfig.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAuthHTTPBasic.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAuthLDAP.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAuthMembership.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAuthNT.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAuthRadius.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAuthSafeWord.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAuthSecurID.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAuthUnix.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAuthWindowsDesktopSSO.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amAuthenticationDomainConfig.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amClientData.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amClientDetection.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amDisco.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amEntrySpecific.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amG11NSettings.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amLibertyPersonalProfile.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amLogging.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amNaming.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amPasswordReset.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amPlatform.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amPolicy.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amPolicyConfig.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amProviderConfig.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amSAML.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amSOAPBinding.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amSession.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amUser.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/amWebAgent.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/xml/identityLocaleService.xml
    
    $ADMIN_CLI --runasdn "$1" --password "$2" --data IS_INSTALL_ETCDIR/IS_PRODNAME/config/request/SunAMClientData.xml IS_INSTALL_ETCDIR/IS_PRODNAME/config/request/mobileRequest.xml
