Site icon UnixArena

Create SSO Users using ssh – dir-cli – VCSA 6.5

SSO User Creation - VMware Appliance - VCSA 6.5

Create SSO users using SSH session on VCSA 6.5 with help of dir-cli utility. I had faced the strange issue after VCSA 6.5 deployment on My LAB that SSO account was not created. Could be my mistake and haven’t followed the best practice for the VCSA 6.5 deployment. But I have figured out the way to add the SSO users by logging in to VCSA 6.5’s ssh as root user. From vSphere 6.0, you can now easily create and manage SSO Users using dir-cli within the Platform Services Controller (PSC).  

 

Pre-requisites :

You must have access to VCSA 6.5’s root account & ssh access must be enabled for VCSA 6.5 appliance.

 

  1. Login to VCSA 6.5 as root on ssh session.
Login to VCSA as root

 

2. You will get command prompt like below.

VCSA command Prompt

 

3. Gain the shell access.

Gain Shell Access on VCSA

 

4. Create a new user account on SSO using dir-cli.

root@VCSA6.5:# [ ~ ]# /usr/lib/vmware-vmafd/bin/dir-cli user create --account rajkumar --first-name rajkumar --last-name kumar --user-password 'Welcome@123'
Enter password for administrator@vpshere.local:
User account [rajkumar] created successfully
root@VCSA6.5:# [ ~ ]#

 

5. Add the user in group administrator.

root@VCSA6.5:# [ ~ ]# /usr/lib/vmware-vmafd/bin/dir-cli group modify --name Administrators --add rajkumar
Enter password for administrator@vpshere.local:
Account [rajkumar] added to group [Administrators]
Group member [rajkumar] added successfully

 

6. List the administrators users.

root@VCSA6.5:# [ ~ ]# /usr/lib/vmware-vmafd/bin/dir-cli group list --name Administrators
Enter password for administrator@vpshere.local:
cn=Administrator,cn=Users,dc=vpshere,dc=local
CN=machine-8dc51c49-183f-450e-8f4d-384fc0e22142,CN=ServicePrincipals,DC=vpshere,DC=local
CN=vsphere-webclient-8dc51c49-183f-450e-8f4d-384fc0e22142,CN=ServicePrincipals,DC=vpshere,DC=local
CN=Linges waran,cn=users,dc=vpshere,dc=local
CN=rajkumar kumar,cn=users,dc=vpshere,dc=local
root@VCSA6.5:# [ ~ ]#

 

7. Access the vSphere web-client portal and try to login with newly created user.

——————————————————————————————————————–

We could also create the appliance management user account from the command prompt.

=> List the appliance management account.

Command> localaccounts.user.list
Config:
  1:
      Username: root
      Status: enabled
      Role: superAdmin
      Passwordstatus: valid
      Fullname: root
      Email: ''

Command>

 

=> Creating the appliance management account .

Command> localaccounts.user.add --role operator --username unixarena --password
Enter password:
Reenter password:
Command>

Command> localaccounts.user.list
Config:
  1:
      Username: root
      Status: enabled
      Role: superAdmin
      Passwordstatus: valid
      Fullname: root
      Email: ''

 2:
      Username: unixarena
      Status: enabled
      Role: operator
      Passwordstatus: valid
      Fullname: unixarena
      Email: '


root@192 [ ~ ]#

 

 

Exit mobile version