본문 바로가기
Virtual Platform/VMware

ssh를 이용하여 dir-cli로 SSO 사용자 생성하기(VCSA 6.5)

by 레이루이 2024. 8. 3.
반응형

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.

 

  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 [ ~ ]#

 

* 출처: https://www.unixarena.com/2018/03/create-sso-users-using-ssh-dir-cli-vcsa-6-5.html/?unapproved=1332&moderation-hash=2c9740f5faa505f93d9f636c4e5f2c65#comment-1332

반응형