Create SSO Users using ssh – dir-cli – VCSA 6.5
March 7, 2018 By Lingesh 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.
- Login to VCSA 6.5 as root on ssh session.
![](https://blog.kakaocdn.net/dn/z3PZb/btsIUkU3PjX/gOORJaK2KYjjI3WFISdLpK/img.jpg)
2. You will get command prompt like below.
![](https://blog.kakaocdn.net/dn/dVGIIj/btsITs0jTcn/El8g111cg6YM5X5lMfAYiK/img.jpg)
3. Gain the shell access.
![](https://blog.kakaocdn.net/dn/cKw9Eq/btsIUBWxjgW/dRAKkXkfDciHlfPTtaI19K/img.jpg)
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 [ ~ ]#