If you find yourself in a situation in which all portal administrator credentials have been deleted or are unknown, you can create a new temporary administrator using the Create Administrator Account utility. This is a command line utility included with Portal for ArcGIS and is located in the <Portal for ArcGIS installation location>\tools\accountmanagement directory.
- Log in to the machine where Portal for ArcGIS is installed.
- Open a command prompt window using the Run as administrator option.
- From the command line, browse to the tools\accountmanagement folder of the Portal for ArcGIS installation directory.
- Run the following command to list the available administrator accounts: CreateAdminAccount list.
This command displays all administrator accounts registered with the portal's built-in identity store, as well as any administrators that the portal is using from an LDAP store.
- If no accounts are listed or you don't know the password of any of the accounts, run the following command to create a new administrator account: CreateAdminAccount create -u <newUsername> -p <newPassword> -ut <newUserTypeId>
If the user type id is not specified, or there is more than one compatible user type available, the administrator account will be assigned a temporary user type. After logging in, the administrator can assign a user type to their account.
This creates a new administrator account in the portal's built-in identity store. The user name must have at least four characters and the password must have at least eight characters. Because the account is intended to be temporary, only standard ASCII characters are allowed.
You can then log in to the portal website using the new account.
You should only use this account temporarily to recover control of your portal. As soon as possible, use the portal website to create a new portal account with administrative privileges and use the portal website to delete the account you created with the Create Administrator Account utility.