vCenter

 View Only
  • 1.  how to check root expire information of VCSA

    Posted Oct 30, 2018 05:52 AM

    Currently, I am working on a project to upload a file to VCSA  with root account using this api “makeDirectoryInGuest”, but it is fail to connect. The root cause is my root account is expired. So I want to find a API to check if the account is expired or get root expire information( such as expire date). I find ValidateCredentialsInGuest api can be used to do authority, but it will return the same exception if the password is expired or incorrect password, and I can not distinguish them. Does anyone help to guide which api should I use to get root expired information.



  • 2.  RE: how to check root expire information of VCSA

    Posted Oct 30, 2018 06:33 AM

    Hi,

    Try to reset the password using the below KB and set it to 0 in administration afterwards.

    VMware Knowledge Base

    Login to your VCSA and navigate to Administration to find the password expiry details and change it to 0 days to never expire.

    Regards,



  • 3.  RE: how to check root expire information of VCSA

    Posted Oct 30, 2018 07:33 AM

    Thanks for you information, I know where to reset it or change expire rule.

    But I am using the code(script) to upload file to VCSA with root account, so before I do upload action, I should check if the root account has expired or not? If it is expired, my code should popup message like "root account is expired, please reset or change it ". So my question is that if  there is an API to get expire information or validate if root is expired?



  • 4.  RE: how to check root expire information of VCSA

    Posted Oct 30, 2018 07:42 AM

    i'm not sure about any API to check something like that. As far as I know, pyvmomi can be used to create users.

    Please try to login to VCSA with your current root account, it tells whether it is expired or not.

    Regards,



  • 5.  RE: how to check root expire information of VCSA

    Posted Oct 30, 2018 12:58 PM

    "chage -l root" command will give you information related to password expiration