How to create user from one domain to remote domain

Hi All,
I want to create user in Security Realm from my own domain to a remote domain programatically. Can you suggest the entire process.
Thanks in Advance.

Not sure why but for me all the errors were resolved .
import java.util.Hashtable;
import javax.management.AttributeNotFoundException;
import javax.management.InstanceNotFoundException;
import javax.management.IntrospectionException;
import javax.management.MBeanException;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.ReflectionException;
import javax.management.modelmbean.ModelMBeanInfo;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class Test {
     * @param args
     * @throws NamingException
     * @throws NullPointerException
     * @throws MalformedObjectNameException
     * @throws ReflectionException
     * @throws MBeanException
     * @throws InstanceNotFoundException
     * @throws AttributeNotFoundException
     * @throws IntrospectionException
     public static void main(String[] args) throws NamingException, MalformedObjectNameException, NullPointerException, AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException, IntrospectionException {
          // TODO Auto-generated method stub
          Hashtable env = new Hashtable();
          env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
          env.put(Context.SECURITY_PRINCIPAL, "weblogic");
          env.put(Context.SECURITY_CREDENTIALS, "weblogic1");
          env.put(Context.PROVIDER_URL, "t3://localhost:7001");
          InitialContext ctx = new InitialContext(env);
          MBeanServer wls = (MBeanServer) ctx.lookup("java:comp/env/jmx/runtime");
          ObjectName userEditor = null;
          ObjectName MBTservice = new ObjectName("com.bea:Name=MBeanTypeService," + "Type=weblogic.management.mbeanservers.MBeanTypeService");
          ObjectName rs = new ObjectName("com.bea:Name=RuntimeService,"+"Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean");
          ObjectName domainMBean = (ObjectName) wls.getAttribute(rs,"DomainConfiguration");
          ObjectName securityConfig = (ObjectName) wls.getAttribute(domainMBean,"SecurityConfiguration");
          ObjectName defaultRealm = (ObjectName) wls.getAttribute(securityConfig,"DefaultRealm");
          ObjectName[] atnProviders = (ObjectName[]) wls.getAttribute(defaultRealm,"AuthenticationProviders");
          for (ObjectName providerName : atnProviders) {
          if (userEditor == null) {
          ModelMBeanInfo info = (ModelMBeanInfo) wls.getMBeanInfo(providerName);
          String className = (String) info.getMBeanDescriptor().getFieldValue("interfaceClassName");
          if (className != null) {
          String[] mba = (String[]) wls.invoke( MBTservice, "getSubtypes", new Object[] {"weblogic.management.security.authentication.UserEditorMBean" }, new String[] { "java.lang.String" });
          for (String mb : mba)
          if (className.equals(mb)) userEditor = providerName;
          if (userEditor == null) throw new RuntimeException("Could not retrieve user editor");
          try{
          System.out.println("Creating User : testuser");
          wls.invoke(userEditor,"createUser",new Object[] {"testuser","password","test user"},new String[] {"java.lang.String", "java.lang.String","java.lang.String"});
          System.out.println("Created User : testuser");
          catch(Exception e){
          e.printStackTrace();
          ctx.close();
}

Similar Messages

  • How to create partition from one table to another?

    Hi,
    Can any one help me in this :
    I have copied table from one schema to another by using the following command. The table is around 300 GB in size and the partitions are not copied. Now i got a request to create partitions in the destination table similar to the source table.
    CREATE TABLE user2.table_name AS SELECT * FROM  user1.table_name;
    I am using Oracle 9i database. This is very urgent, could any one please suggest me how can i create the partitions in  user2 table as user1 table.

    If you have the TOAD/ SQL DEVELOPER  , get the partition DDL from the source table and execute it in the newly created table.
    or you can use DBMS_METADATA:
    SET LONG 10000
    SELECT dbms_metadata.get_ddl('TABLE', 'TEST')
    FROM DUAL;
    Thanks,
    <Moderator Edit - deleted link signature - pl see FAQ link on top right>

  • How to create PO from one palnt to another plant

    Dear All,
    We need to create new Purchase orders from One plant to another plant. Can you please provide me any suggestions to achive this.
    Main hurdle are: We need to create new PO for the completely open Purchase order for old plant.
    Secondly we need to create PO from old PO which have partial goods receipt and which have equally invoice receipts, so that we can create new PO for the open quanityt and the open invoices.
    I do not see any other case which we can consider to open new PO from the old PO. If there are to consider some please do let me know.
    Secondly we have to extend the materials from one plant to another plant. Issue is we do not know which views are maiantained for materials which needs to be extend also what are the fields filled for each views. In order to avoid extracting the data from table, structuring it and then reload for new plant we are planning to create some program or is there any existing standard program which can extend material from one plant to another.
    One more issue in out plant extension is we have some Z fields in MARC so how we can use that too to extend it to another plant.
    Can you please provide me some suggestions/help on this.
    Thanks.
    Shashi

    Please check this answered link for extending material to another plant through BAPI:
    BAPI to extend material
    If new fields are added to material master, they are applicable at client level, so after extension to new plant, those newly created fields will be available there as well.
    For copying PO's to new plant, you can copy them through ME21n.

  • How to create table from one to another schema?

    Hi,
    There is two schema A and B. schema A want to create table on Schema. which privilege we need to provide? how to create?
    thanks in advance
    Thanks,

    user2017273 wrote:
    Hi,
    There is two schema A and B. schema A want to create table on Schema. which privilege we need to provide? how to create?
    thanks in advance
    Thanks,When you give CREATE ANY TABLE TO A then user A will create table on any schema.But you can create stored PROCEDURE on schema B for creating table and give GRANT EXECUTE <PROC NAME> to A.

  • How to migrate users from one environment to another

    Hi Guys,
    R12.1.1 on Linux
    What is the best way to migrate or copy users from dev or prod to new instance that is a fresh install.
    Thanks in advance

    Hi,
    You can use FNDLOAD to migrate the users/responsibilities.
    Note: 232029.1 - How to move User/Responsibilities across 11i Apps instances
    Note: 376469.1 - Can FNDLOAD Migrate User Accounts Without Forcing Users To Change Their Passwords?
    Regards,
    Hussein

  • How to Move users from one OU to another

    I need move user for one OU another, but show error
    this my script:
    Import-Module activedirectory
    $Users = Import-Csv -Delimiter ";" -Path "D:\Joan\teste.txt"
    foreach ($User in $Users)
        $DisplayName = $User.Usuarios
        $TempUser = Get-ADUser -Filter { DisplayName -like $DisplayName }
    Move-ADObject -Identity $DisplayName -TargetPath "OU=teste,DC=teste,DC=br"
    This error:
    ove-ADObject : Não é possível localizar um objeto com identidade: 'ALCIDES ALVES MACHADO                                                                      
    ' em: 'DC=teste,DC=br'.
    Em linha:8 caractere:14
    + Move-ADObject <<<<  -Identity $DisplayName -TargetPath "OU=teste,DC=teste,DC=br"
        + CategoryInfo          : ObjectNotFound: (ALCIDES ALVES M...               :ADObject) [Move-ADObject], ADIdentityNotFoundException
        + FullyQualifiedErrorId : Não é possível localizar um objeto com identidade: 'ALCIDES ALVES MACHADO                                                                      
    ' em: 'DC=teste,DC=br'.,Microsoft.ActiveDirectory.M
       anagement.Commands.MoveADObject

    I try, but... :/
    Move-ADObject : Não é possível validar o argumento no parâmetro 'Identity'. O argumento é nulo. Forneça um argumento que não seja nulo e tente o comando novamente.
    Em linha:8 caractere:25
    +  Move-ADObject -Identity <<<<  $TempUser.distinguishedname -TargetPath "OU=teste,DC=teste,DC=br"
        + CategoryInfo          : InvalidData: (:) [Move-ADObject], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.ActiveDirectory.Management.Commands.MoveADObject

  • How to move user from one partition to another partition

    i install ims 5.2 on solaris 8, the messagestore is default ..../partition/primary, now i add a new disk, and add a partition secondary through startconsole,when i want to move b user to the new parition , i get a error. anyone can help me, thank a lot
    $ ./mboxutil -r user/b/inbox user/b/inbox secondary
    System I/O error. Administrator, check server log for details.
    $

    hi,jay_plesset
    i downloaded the 5.2p1 and installed it, there are some error.
    Running Post-install procedures.
    /usr/iplanet/server5/msg-ultra1/imsimta chbuild
    -- line #3 of language code fileno country name specified --
    /usr/iplanet/server5/msg-ultra1/imsimta cnbuild
    07:27:11.93: Error in mm_init -- error initializing ch_ facility: no country nam
    -- line #3 of language code file
    /usr/iplanet/server5/msg-ultra1/imsimta cleandb
    /usr/iplanet/server5/msg-ultra1/imsimta version
    SunOS ultra1 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-1
    iPlanet Messaging Server 5.2 (built Feb 21 2002)
    libimta.so 5.2 (built 15:07:23, Feb 21 2002)
    New Installed Version is 5.2
    WARNING: Newly Installed revision string 0 does not match, it should be 1.09
    2.what's your mean,"Moving a user's partition by manually moving files, will not update the LDAP database. You MUST do this manually, "
    i mv the user,and run reconstruct -m, everything seems ok.

  • How to transfer file from one machine to remote machine?

    Hi All,
    I dont know Question i am posting should go to this forum or to another form? so sorry in advance.
    In my web application i am using tomcat server. On one user action server is generating one file which i want to copy to some remote location.
    I m just confused which API should i used and which is better way like using RMI or by socket Programming or anything else?
    Any help would be greatly appreciated.
    Thanks and regards,
    Rohit kotecha.

    do you have some sort of existing java application running on the destination location which will receive the file, or are you starting completely from scratch?
    if you are starting completely from scratch, i'd suggest setting up a simple ftp or web server on the destination location.

  • Transfer of user from one AD / Exchange domain to another AD / Exchange domain

    Hi All,
    I want evaluate transfer of user scenario from one AD domain to Another AD domain using out of box AD connector.I have three AD domain in one Forest as below.
    Root -  example.com
               |_____domain1.example.com
               |_____domain2.example.com
               |_____domain3.example.com
    In my case i have two attributes on which I need to transfer user from one AD domain to another AD domain. e.g. suppose from trusted source if I changed the MINOR_ORG_CODE and MAJOR_ORG_CODE, transfer of user event should get initialized and user should transfer from one AD domain to another AD domain.Once user transfer from one AD domain to another AD domain, he/she should be de-provision from previous domain.While transfer his mail box or exchange account should also be transfer from one exchange domain to another exchange domain.Exchange domain is also in same forest.
    Thanks in advance.
    Regards,
    Nitin Natekar

    Case 1:
    Here you can written pre-update event handler which will check whether minor and major org code changed or not.
    If changed then first starts de-provisioning and then start provisioning.
    If not changed then do nothing.
    This approach will not transfer accounts from one domain to another but it will create fresh accounts and remove accounts from old domain.
    Case2:
    If you want to transfer accounts from one domain to another in that on pre-update you have to change OU of user on process which automatically move to another domain.
    but not sure about exchange it is possible to move to another domain.
    hopping that all domains under same forest otherwise same Connector Sever will not work.

  • How to drag and drop user from one node to other node.

    Dear All,
    How to drag and drop user from one node to other node.I tried but no success.
    What are precautions to be taken.
    Cay anybody kindly explain it.
    Thank you.

    Hello, if you had this message you had created BP....
    Now you don't have to user USERS_GEN this transaction is used only in first action, when you create the user in R/3 and then you pass this user to EBP in the organizational structure.
    Now you have to:
    1) Go to PPOMA_BBP
    2) Double click on organizational unit that you want to put this user (purchasing organization or purchasing group box for example)
    3) Select assign button in the top of the functions in the transaction
    4) Click on incorporates -- position
    5) Put userID that you want to add in this organizational unit
    6) Click Save
    Thanks
    Rosa

  • How to prevent users from creating new folders in share folder directory?

    Hello guys
    I'd like to know How to prevent users from creating new folders in share folder directory but still keep their power of creating new folders in their personal 'my folder'?
    I tried changing the 'manage privilage ---- create folder' to deny certain user accounts, but by doing so, it also stops the user from creating new folders in their 'my folder', which is not good..
    I also tried going into these share folders and tried different access types such as 'change/delete', 'read', 'traverse folder' etc, but none of it work ideally. The 'change/delete' access still allows them to create new folders, 'read' access prevents creating new folders but also take away their power of saving reports..
    Any thoughts on how to take away their ability to ONLY create new folders in share folder areas without affecting their other privileges?
    Please advise
    Thank you

    Easy, on the shared folders root folder only give them 'read' or 'traverse folder' but on the the folder inside the shared folders root folder give them 'change/delete'. That means they can change anything inside those folders but not create any folders at the shared folders root level.

  • How to move iTunes from one user to another on the same Windows 7  computer

    How to move iTunes from one user to another on the same Windows 7 computer? Thanks, Bob

    Move the iTunes library to a shared area and then into the desired location. If this isn’t the default one, launch iTunes with the Shift key held down and choose that library.
    (122379)

  • How to forward alert from one user to another user and how to reject?

    Hi everybody.
    How to forward alert from one user to another user and how to reject and how to complete alert?
    Regards,
    Vinay.

    What alert are you talking about? Which version of BOE / Edge do you use?

  • How to create user for a Domain

    Hi
    How we can create a User and assign him to a particular domain?
    Thanks
    BS

    Hi,
    could you explain more exactly what you want to do? Remember that there is no out of the box way to create a "read only" user or to do "audit" based on a user id.
    You edit the users in the EM console in the following path:
    Cluster Topology > Application Server: soa.xxx > OC4J: oc4j_soa > Security Providers > Instance Level Security > Users / Groups
    Se my post regaring how to create a permission group for a "custom" domain:
    http://halfdecentoracle.blogspot.com/2007/02/how-do-i-create-new-user-in-oracle-soa.html
    See Chintan Shah's post on creating a servlet filter to "enforce" a read only view into the BPEL console.
    http://chintanblog.blogspot.com/2007/12/i-saw-numerous-people-asking-about-bpel_290.html

  • How can I move particular users from one client to another client

    Hi, I am trying to find a way to move few or many user from one client to another. Is there a transaction available or program to move them. e.g. there is a SCC1 available to move transport only from one client to another without going through TMS.
    Is there any trick available ?
    thnx in advance

    closing this one. thnx

Maybe you are looking for