Total Pageviews

Thursday, December 17, 2015

OAM 11gr2 deploye/configure webgate to webserver command



Deploy the Webgate to the webserver

cd <FMW_HOME>/OAMWebGate11gR2/webgate/ohs/tools/deployWebGate


./deployWebGateInstance.sh -oh <FMW_HOME>/OAMWebGate11gR2/ -w <FMW_HOME>/Oracle_WT1/instances/ohs_webgate11gR2/config/OHS/ohs1/


 Modify the webserver configuration file or httpd.conf file

cd <FMW_HOME>/Oracle_OAMWebGate11gR2/webgate/ohs/tools/setup/InstallTools

export LD_LIBRARY_PATH=/app/Weblogic/FMW/Oracle_WT1/lib
export PATH=$LD_LIBRARY_PATH:$PATH

to check if required libraries are present use

ldd EditHttpConf  => if you got all the required libraries path you can run below command otherwise make sure you have correct libraries path

./EditHttpConf -oh <FMW_HOME>/Oracle_OAMWebGate11gR2/ -w <FMW_HOME>/Oracle_WT1/instances/ohs_webgate11gR2/config/OHS/ohs1

Saturday, December 5, 2015

manually starting ODSM server when starting from console failed


start Admin server

start Managed Server wls_ods1

cd $DOMAIN_HOME/bin

./startManagedWeblogic.sh wls_ods1

now access ODSM thru console

http://host:port/odsm   where managed server is wls_ods1 and default port is 7005


ODSM Exporting list of members

Exporting list of members in ODSM

following  stepsThe total list of users belonging to a particular group can be exported in an LDIF from ODSM

1.    From the ODSM interface of OID, navigate to the “Data Browser” tab
2.    Expand the Directory Information Tree and select the group whose membership needs to be viewed
3.    Right click on the name of the group in the Directory Information Tree and click “Export LDIF”
4.    Click “OK” on the pop up message and click on the link to view the LDIF
5.    The complete list of users can be copied and pasted into a text file


Thursday, October 15, 2015

xhost fix for oracle linux 7 or all linux servers

when you run installer and get "DISPLAY not set. please set the DISPLAY and try again"

simply follow these steps it works. my target was to login to oracle in order to install oracle database 12c

1) Log on to oracle linux as root
2) Open a terminal
3) echo $DISPLAY    (get this value you have to use it after login to oracle my case it was :0)
4) enter 'xhost +'
5) enter 'su - oracle'
6) enter 'export DISPLAY=:0'
7) runInstaller (or use whatever installer is required)

if you are have an option to use any other terminal then putty i will use mobaxterm, you dont need to do all these  settings in order to run GUI interface.






Monday, October 12, 2015

oracle linux 7 at oracle VM VirtualBox 5.0.6 connecting to internet

oracle linux 7 at oracle VM VirtualBox connecting to internet

once you have installed Oracle Linux 7 at VirtualBox and you are tying to connect to internet in  order to run Rpm or something else you need to enable Ethernet.

this button is at the Top Right corner of VirtualBox 5.0.6 next to the speaker button. click and Enable one port it will let you connect to internet.


Tuesday, July 21, 2015

OIM plugin to generate custom userid

package oracle.iam.plugins;

import java.util.Locale;
import java.util.Map;

import java.util.Random;
import java.util.logging.Level;
import java.util.logging.Logger;

import oracle.iam.identity.exception.UserNameGenerationException;
import oracle.iam.identity.usermgmt.api.UserNamePolicy;
import oracle.iam.identity.usermgmt.utils.UserNameGenerationUtil;
import oracle.iam.identity.usermgmt.utils.UserNamePolicyUtil;
import oracle.iam.platform.kernel.ValidationFailedException;

public class ShahbazUserNamePolicy implements UserNamePolicy {
    private static final String CLASS_NAME =
        ShahbazUserNamePolicy.class.getSimpleName();

    private static final String policy =
        "ShahbazUserNamePolicy:Validation Failed: ";
    private static Logger logger =
        Logger.getLogger("COM.SHAHBAZ.ShahbazUserNamePolicy");

    public ShahbazUserNamePolicy() {
        super();
    }

    /**
     *This is the main method which gets trigger and generate user name based on requested input data e.g. first name and last name.
     * @param reqData - Map contains request data e.g. first name and last name
     * @return- generated user name
     * @throws ValidationFailedException
     */
    public String getUserNameFromPolicy(Map<String, String> reqData) throws ValidationFailedException {


        String METHOD_NAME = CLASS_NAME + ":" + "getUserNameFromPolicy: ";
        logger.log(Level.FINE, METHOD_NAME + ":START");

        String userName = null;

        String fullName =
            (String)reqData.get("First Name") + " " + (String)reqData.get("Last Name");
        logger.log(Level.FINE,
                   METHOD_NAME + ":Generating Network ID for User Full Name:" +
                   fullName);


        userName = generateNetworkId();
        userName = UserNameGenerationUtil.trimWhiteSpaces(userName);


        try {
            if ((UserNamePolicyUtil.isUserExists(userName)) ||
                (UserNamePolicyUtil.isUserNameReserved(userName))) {

                boolean userNameGenerated = false;

                for (int ix = 1; ix < Integer.MAX_VALUE; ix++) {
                    userName = generateNetworkId();
                    if (UserNameGenerationUtil.isUserNameExistingOrReserved(userName)) {
                        continue;
                    }
                    userNameGenerated = true;
                    break;
                }

                if (!userNameGenerated) {
                    String error_message =
                        "This should never happen. OIM is failed to generate unique user name for " +
                        fullName;
                    showErrorMessagePopup(error_message);
                }
            }
        } catch (UserNameGenerationException e) {
            logger.log(Level.SEVERE,
                       METHOD_NAME + "Exception: " + e.getMessage(), e);
        }

        System.out.println(METHOD_NAME +
                           ":Successfully generated unique network ID for " +
                           fullName + " Network ID: " + userName);
        logger.log(Level.FINE,
                   METHOD_NAME + ":Successfully generated unique network ID for " +
                   fullName + " Network ID: " + userName);
        logger.log(Level.FINE, METHOD_NAME + ":END");

        return userName;
    }

    @Override
    public boolean isUserNameValid(String string, Map<String, String> map) {
        return false;
    }

    @Override
    public String getDescription(Locale locale) {
        return "Generate Unique Network ID n + 5 random numbers + 2 random chars ShahbazUserNamePolicy";
    }

    /**
     *This method is used to generate random netowork id
     * @returns random network id
     */
    private static String generateNetworkId() {

        Random rand = new Random();
        String userid = "n";

        int pick = rand.nextInt(90000) + 10000;
        userid = userid.concat(Integer.toString(pick));

        char c1 = (char)(rand.nextInt(26) + 'a');
        char c2 = (char)(rand.nextInt(26) + 'a');
        userid = userid.concat(Character.toString(c1));
        userid = userid.concat(Character.toString(c2));

        return userid;

    }


    /**
     *This method is used to show error message popup if there is any validation failure.
     * @param errorMessage - Message to be displayed.
     * @throws ValidationFailedException
     */
    private void showErrorMessagePopup(String errorMessage) throws ValidationFailedException {

        String error_message = policy + errorMessage;
        ValidationFailedException exception =
            new ValidationFailedException(error_message);
        exception.setErrorCode("IAM-3050105");
        exception.setErrorData(new Object[] { error_message });
        throw exception;

    }

 /*   public static void main(String[] args) {
        ShahbazUserNamePolicy unamePolicy = new ShahbazUserNamePolicy();
        for (int j = 0; j < 10; j++) {
            System.out.println(unamePolicy.generateNetworkId());
        }
    }
*/
}

Wednesday, July 1, 2015

OPAM 11g certificate import error


OPAM certificate import error

Error:
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect

Solution:

if you did not setup the keystore password please use default values. here are the

Default Weblogic DemoTrust & DemoIdentity KeyStore passwords 

 

Trust store location
%ORACLE_HOME%/weblogic/wlserver_10.3/ server/lib/DemoTrust.jks
Trust store password
DemoTrustKeyStorePassPhrase
Key store location
%ORACLE_HOME%/weblogic/wlserver_10.3/ server/lib/DemoIdentity.jks
Key store password
DemoIdentityKeyStorePassPhrase
Private key password
DemoIdentityPassPhrase


run the command again with this default value

 

keytool -import -file /oracle/software/repo/filename.pem -keystore /oracle/Middleware/wlserver_10.3/server/lib/DemoTrust.jks -storepass DemoTrustKeyStorePassPhrase -trustcacerts -alias opam