• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

UnixArena

  • Home
  • kubernetes
  • DevOps
    • Terraform
    • Jenkins
    • Docker
    • Openshift
      • OKD
    • Ansible engine
    • Ansible Tower
      • AWX
    • Puppet
  • Cloud
    • Azure
    • AWS
    • Openstack
    • Docker
  • VMware
    • vCloud Director
    • VMware-Guests
    • Vcenter Appliance 5.5
    • vC OPS
    • VMware SDDC
    • VMware vSphere 5.x
      • vSphere Network
      • vSphere DS
      • vShield Suite
    • VMware vSphere 6.0
    • VSAN
    • VMware Free Tools
  • Backup
    • Vembu BDR
    • Veeam
    • Nakivo
    • Azure Backup
    • Altaro VMBackup
    • Spinbackup
  • Tutorials
    • Openstack Tutorial
    • Openstack Beginner’s Guide
    • VXVM-Training
    • ZFS-Tutorials
    • NetApp cDot
    • LVM
    • Cisco UCS
    • LDOM
    • Oracle VM for x86
  • Linux
    • How to Articles
    • Q&A
    • Networking
    • RHEL7
  • DevOps Instructor-led Training
  • Contact

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

March 7, 2018 By Cloud_Devops 4 Comments

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
Login to VCSA as root

 

2. You will get command prompt like below.

VCSA command Prompt
VCSA command Prompt

 

3. Gain the shell access.

Gain Shell Access on VCSA
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 [ ~ ]#

 

 

Filed Under: VCSA 6.0, VCSA 6.5, VMturbo Tagged With: VCSA 6.5, VMware

Reader Interactions

Comments

  1. snowfox says

    July 21, 2022 at 12:54 pm

    I try create SSO user account(VCSA 6.0 use). but i’ve got below error messages.

    localhost:/usr/lib/vmware-vmafd/bin # ./dir-cli user create –account snowwolf –first-name snow –last-name wolf –user-password
    Enter password for administrator@vcenter.local:
    Enter password for snowwolf@vcenter.local:
    dir-cli failed. Error 9232: Possible errors:
    LDAP error: Constraint violation
    Win Error: Operation failed with error ERROR_WRITE_PROTECT (19)

    Have any idea?

    Reply
  2. Greg says

    August 11, 2021 at 2:14 pm

    Nice article!
    one can also utilize VMware.vSphere.SsoAdmin module to deal with SSO actions from the repo https://github.com/vmware/PowerCLI-Example-Scripts

    Reply
  3. KP says

    August 10, 2021 at 8:02 am

    Great info. Helped me solve my issue. Thank you.

    Reply
  4. sang deuk says

    March 4, 2020 at 8:02 pm

    Thank yo for your posting
    It helped me to solve any issues
    I wanna communicate with you. ~~
    my email is sangsang.kwon@samsung.com ^.^

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Follow UnixArena

  • Facebook
  • LinkedIn
  • Twitter

Copyright © 2025 · UnixArena ·

Go to mobile version