FreeKB - Create users in WebSphere
Create users in WebSphere

Home > Search


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.sh (Linux) or wsadmin.bat (Windows).

# 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>

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




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




Comments