I can create a user account through the web client.
But I want to create users, using vim25 SDK(JAVA).
I can retrieve user information from UserDirectory(retriveUserGroups method) but I couldn't find the method to create a user in vCenter server.
HostLocalAccountManager only works for ESXi.
Any suggestions?
I will really appreciate your help! Thanks!
Yes HostLocalAccountManager works only for ESXi, it will throw null for VC session (si.getAccountManager())
Use SSH commands to create users and groups on linux or windows VC,
Commands for Linux VC:
// Add new group
> pi shell groupadd groupname
// Add new user
> pi shell useradd -g group user -p `openssl passwd -crypt password`
Commands for Windows VC:
// Add new user
> net user username password /ADD /EXPIRES:NEVER
// Add new group
> net localgroup group /ADD
// Assign the user to the group
> net localgroup group user /ADD