Bootstrap FreeKB - IBM WebSphere - User Accounts Repository - create users
IBM WebSphere - User Accounts Repository - create users

Updated:   |  IBM WebSphere articles

WebSphere can be configured to obtain users from the following sources.

You can only create a new user account in WebSphere if WebSphere is configured to use fileRegistry.xml as the user accounts repository. If WebSphere is configured to obtain user accounts from LDAP, Operating System, or a SQL database, then you would create user accounts in LDAP or in the Operating System or in the SQL database.

In the WebSphere admin console, expand Users and Groups and select Manage Users. If the below message is displayed, this suggests that WebSphere is configured to use the LDAP, Operating System, or a SQL database for authentication.

 

If there is an option to Create, WebSphere is configured to use a federated repository for authentication. In this example, a user named jeremy.canfield is created.

 

Users can also be created using wsadmin.

# Jython
AdminTask.addFileRegistryAccount(-userId username -password password)

# Jacl
$AdminTask addFileRegistryAccount {-userId username -password password}

 

Save the change to the master respository.

# Jacl
$AdminConfig save

# Jython
AdminConfig.save()

 

And to then display the users in the registry.

# Jython
AdminTask.searchUsers('[-uid *]')

# Jacl
$AdminTask searchUsers { -uid * }

 

Under the hood, this will create an entry in the ${was_install_root}/profiles/your_profile/config/cells/your_cell/fileRegistry.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<sdo:datagraph xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:sdo="commonj.sdo" xmlns:wim="http://www.ibm.com/websphere/wim">
  <wim:Root>
    <wim:entities xsi:type="wim:PersonAccount">
      <wim:identifier externalId="5b665205-7fb1-463e-a8d3-4dfa89d3fc23" externalName="uid=jeremy.canfield,o=defaultWIMFileBasedRealm"
          uniqueId="5b665205-7fb1-463e-a8d3-4dfa89d3fc23" uniqueName="uid=jeremy,o=defaultWIMFileBasedRealm"/>
      <wim:parent>
        <wim:identifier uniqueName="o=defaultWIMFileBasedRealm"/>
      </wim:parent>
      <wim:createTimestamp>2018-09-07T19:25:04.675Z</wim:createTimestamp>
      <wim:password>U0hBLTE6Z45kCaJkZ2dzcjMxOnpWeFN6hjvDflBtZW41Smt5UDBxNW1tL1119hFK</wim:password>
      <wim:uid>jeremy.canfield</wim:uid>
      <wim:cn>Jeremy</wim:cn>
      <wim:sn>Canfield</wim:sn>
    </wim:entities>
  </wim:Root>
</sdo:datagraph>

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 7e3e5d in the box below so that we can be sure you are a human.