Manage users
After an administrator creates Bastionhost users on the Bastionhost management page, O&M engineers can use these users to log on to Bastionhost and access the authorized host or database assets.
User types
Bastionhost allows you to import Alibaba Cloud RAM users, create Bastionhost local users, or import AD, LDAP, or IDaaS authentication users to act as Bastionhost O&M engineers.
IDaaS users cannot yet use password authentication to log on to Bastionhost with client tools for asset O&M. You can use client tools for O&M with O&M token authentication, or use the O&M portal. For more information, see O&M Guide.
|
User type |
Description |
|
RAM user |
After you create an Alibaba Cloud RAM user in the RAM console, you can import RAM users on the Bastionhost management page with one click. |
|
Bastionhost local user |
You can create Bastionhost local users one by one, or import them in batches from a file. |
|
AD/LDAP user |
You can configure AD or LDAP authentication on Bastionhost and synchronize AD or LDAP users to Bastionhost. Note
Before you import AD or LDAP users, make sure that AD or LDAP authentication is configured. For more information, see Configure AD or LDAP authentication. |
|
IDaaS user |
You can configure IDaaS authentication on Bastionhost and synchronize IDaaS users to Bastionhost. Only Bastionhost Enterprise Edition and SM Edition support IDaaS users. If your Bastionhost instance is a Basic Edition instance, upgrade it to a supported edition. For more information, see Upgrade instance specifications. Note
Before you import IDaaS users, make sure that IDaaS authentication is configured. For more information, see Manage IDaaS authentication. |
User list
After you create users, use the following table to understand what each item in the user list means.
|
Item |
Description |
|
Logon Name |
The account name that the user uses to log on to Bastionhost.
|
|
Authentication Source |
The user type. For example, a local user is displayed as Local Authentication. |
|
Two-factor Authentication Methods |
After a user passes password authentication when logging on to Bastionhost, a dynamic verification code is sent by text message, email, or DingTalk work notification for secondary authentication. This reduces security risks.
|
|
OTP App |
Whether the current user has bound a mobile TOTP token. For information about how to bind one, see Create users. Note
This item does not apply to RAM users or IDaaS users. |
|
Status |
The current user status. For information about user status settings, see User settings.
|
|
Actions |
The authorization operations that the administrator performs on the target user. For more information, see Authorize users or user groups to manage assets and asset accounts or Grant permissions on asset groups. |
Create users
Create user accounts for O&M engineers to log on to Bastionhost based on your business requirements.
Import RAM users
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
On the Users page, click Import RAM Users.
-
Optional: If you have not created a RAM user, you can go to the Import RAM Users page and click Create RAM User to create a RAM user by following the on-screen instructions.
For information about how to create a RAM user, see Create a RAM user.
-
On the Import RAM Users page, find the target RAM user, and in the Actions column, click Import to import a single RAM user. Alternatively, select multiple RAM users and click Import to import them in batches.
NoteTo configure two-factor authentication for a RAM user, log on to the RAM console and configure multi-factor authentication (MFA) for the RAM user. For more information, see Bind an MFA device to an Alibaba Cloud account.
Create local users
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
-
On the Users page, create a single user or import multiple users from a file by referring to the following table.
Scenario
Procedure
Create a single local user
-
Choose Import Other Users > Create User
-
In the Create User panel, configure the user information and click Create.
To configure the user information, set Authentication Method to Local Authentication. In addition to basic information, you can perform the following operations.
-
Turn on Users must reset the password at next logon.: after you select this option, local users are forced to change their passwords at the next logon. This feature is available only for local users.
-
Set Validity Period: after you set a validity period, in the user list, the Status column shows the status of a user outside the validity period as Expired, and the user cannot log on to Bastionhost to perform O&M.
-
Configure Two-factor Authentication Methods: after this feature is enabled, a user who passes password authentication when logging on to Bastionhost must complete secondary authentication by using a dynamic verification code sent by text message, email, or DingTalk work notification. This reduces security risks.
Note-
After two-factor authentication is enabled, users must use a mobile phone number or an email address to receive verification codes when they log on. Make sure that the mobile phone number or email address that you entered is correct. For information about the countries and regions that support two-factor authentication by text message on Bastionhost, see Countries and regions that support two-factor authentication by text message.
-
The mobile phone number and email address that you entered are used only to receive verification codes or alert messages and are not used for other purposes.
Two-factor Authentication Methods supports the following two types:
-
Select For All Users: the current user uses the global two-factor authentication method, that is, the method that you configure in System Settings. For more information, see Enable two-factor authentication.
-
Select For Single User: you must separately specify a two-factor authentication method for the current user. Bastionhost supports the following two-factor authentication methods:
-
Disable: two-factor authentication is disabled.
-
Text Message: the text messages of the current user are used for secondary authentication. In this case, you must specify a mobile phone number for the user.
-
Email: the email address of the current user is used for secondary authentication. In this case, you must specify an email address for the user.
-
DingTalk: the DingTalk account of the current user is used for secondary authentication. In this case, you must specify a mobile phone number for the user.
NoteTo enable DingTalk authentication, make sure that the following requirements are met:
A mobile phone number is associated with the user account that is used for O&M. For more information about how to add a mobile phone number for a user, see Modify the basic information of a local user.
The DingTalk administrator has created an internal enterprise application and granted it the API Access Permission To Get Member Information By Phone Number And Name.
You have obtained the AppKey, AppSecret, and AgentId of the internal enterprise application.
-
OTP App: the mobile OTP token of the current user is used for authentication. The user must bind a mobile OTP token first.
NoteTo use this authentication method, download standard TOTP authentication software, such as the Alibaba Cloud app. Then, log on to the Bastionhost O&M portal by using the public endpoint. In the left-side navigation pane, click Security Settings, click the Enable OTP tab, click Bind OTP App, and scan the QR code to bind OTP token authentication. For information about how to obtain the O&M address of Bastionhost, see Bastionhost console overview.
-
SM-based USB Key: logon authentication with an SM USB key. The user must bind a USB key certificate first. For more information, see Bind a USBKEY certificate.
Note-
Only SM Edition supports logon authentication with an SM USB key. If your Bastionhost instance is not SM Edition, upgrade it to a supported edition. For more information, see Upgrade instance specifications.
-
Client/Server O&M does not support two-factor authentication with an SM USB key.
-
-
-
Configure Two-factor Notification Sending Language:
-
Select For All Users: the current user uses the two-factor notification sending language configured in System Settings. For more information, see Enable two-factor authentication.
-
Select For Single User: you can select Simplified Chinese or English as the language in which two-factor notifications are sent.
-
-
-
Import users from a file in batches
-
In the Import Other Users list, select Import Users from File.
-
Click Download User Template to download the user template file to your local machine. Enter the user information in the user template file and save it.
-
In the Import Local Users panel, click Upload to upload the user template file.
-
In the Preview dialog box, select the users that you want to import and click Import.
-
In the Import Local Users panel, confirm the user information and click Import Local Users.
If you select Users must reset the password at next logon., all imported users must reset their passwords at the next logon.
NoteIf a user to be imported has the same username as another user in the file or an existing user in the system, the user is not imported. On the Import Local Users panel, click Details to view the users that were not imported.
-
-
Optional: To allow Bastionhost to send O&M addresses to users by message, specify a mobile phone number or an email address (at least one of them) for the local user, and then select Send O&M Addresses to User.
Import AD/LDAP users
Before you import AD or LDAP users, make sure that AD or LDAP authentication is configured. For more information, see Configure AD or LDAP authentication.
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
-
Choose Import Other Users > Import AD Users or Import LDAP Users.
-
On the Import AD Users or Import LDAP Users page, find the target user, and in the Actions column, click Import.
You can select multiple users to import them in batches.
Import IDaaS users
Before you import IDaaS users, make sure that IDaaS authentication is configured. For more information, see Manage IDaaS authentication.
IDaaS users cannot use password authentication to log on to Bastionhost with client tools for asset O&M. You can use client tools for O&M with O&M token authentication, or use the O&M portal. For more information, see O&M Guide.
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
-
Choose Import Other Users > Import IDaaS User.
-
On the Import IDaaS User page, find the target user, and in the Actions column, click Import.
You can select multiple users to import them in batches. If no IDaaS user is displayed, click Synchronize.
User logon restrictions
You can restrict the source IP addresses and time periods from which users can log on to Bastionhost based on your business scenarios.
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
-
In the user list, click the username of the user whose logon you want to restrict.
-
On the User Logon Restrictions tab, configure the source IP addresses and time periods from which the user can log on to Bastionhost, and then click Update.
-
(Whitelist) Only Listed IP Addresses Are Allowed: only the source IP addresses in the whitelist can log on to Bastionhost during the specified time periods.
-
(Blacklist) Listed IP Addresses Are Not Allowed: the source IP addresses in the blacklist cannot log on to Bastionhost during any time period, and source IP addresses outside the blacklist can log on to Bastionhost only during the specified time periods.
-
Export users
After you export users, you can view the user list in a local CSV file.
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
-
On the Users page, in the upper-right corner of the host list, click Export Users.
Modify the basic information of a local user
To modify the basic information of an AD/LDAP authentication user, a RAM user, or an IDaaS authentication user, go to the corresponding authentication source.
When the mobile phone number, email address, or other information of a user changes, you must promptly update it in the console. Otherwise, the user may not receive verification information in time and may fail to log on to the console. For example, if a user changes their mobile phone number but the new number is not updated on Bastionhost, the verification code is sent to the old number when the user logs on to Bastionhost. As a result, the user cannot receive the verification code and cannot log on to Bastionhost for O&M.
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
-
Find the user whose information you want to modify and click the target username.
-
On the Basic Info tab of the user, modify the user information, and then click Update.
Lock or unlock a user
If a user does not need to use Bastionhost for O&M for a period of time, an administrator can manually lock the user or configure trigger conditions to lock the user automatically. If a locked user needs to perform O&M again, the administrator can unlock the user.
Automatically lock a user
Bastionhost provides automatic user lockout by default. When a user enters an incorrect password more than five consecutive times, Bastionhost automatically locks the user. The administrator can manually set Account Lockout Threshold. For more information, see User settings.
Manually lock or unlock a user
A manual lock or unlock operation takes effect immediately. After a user is locked, the user cannot log on to the server for O&M. Proceed with caution.
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
-
On the Users page, select the users that you want to lock or unlock. At the bottom of the user list, choose or .
-
Locked: after the user is locked, you receive the The user is locked. message. The Status of the locked user changes from Normal to Locked. After a user is locked, the administrator can still modify the basic information of the user and authorize hosts and asset groups for the user.
-
Unlock: after the user is unlocked, you receive the The user is unlocked. message. The user can then log on to Bastionhost as usual and perform O&M on authorized hosts.
-
Manage the public key of a user
If you want Bastionhost to manage the public key of a user, configure the public key and then hand it over to Bastionhost. O&M engineers can then use the private key to log on to Bastionhost through the O&M client. For information about the O&M procedure, see SSH operations.
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
-
In the user list, click the username of the user for whom you want to configure a public key. On the user details page, click the User Public Key tab, and then click Add SSH Public Key.
-
On the Add SSH Public Key panel, configure the public key name and the public key content, and then click Add SSH Public Key.
After configuration is complete, you can view and export the managed public keys of the user in the user public key list.
Delete a user
If an O&M engineer no longer needs to use Bastionhost to perform O&M on hosts, you can delete the user to reduce security risks.
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
-
In the user list, select the user that you want to delete. At the bottom of the list, click Delete.
-
After a source account is deleted from an authentication source such as RAM, AD, LDAP, or IDaaS, the corresponding user in Bastionhost is not automatically deleted. For example, after a RAM account is deleted, the RAM user that was previously imported into Bastionhost remains in the user list. The same applies to accounts deleted from AD, LDAP, or IDaaS authentication sources. In this case, the Status of the user may still be displayed as normal, and established O&M sessions may remain valid. The user may still be able to log on to Bastionhost for O&M, which poses a security risk.
-
To completely disable the user, go to the Personnel > Users page in the Bastionhost console and manually delete the user by following the preceding steps in this section. Alternatively, wait until Bastionhost cannot find the user on the corresponding authentication source by the source ID and the Status changes to Remote Deleted, and then manually delete the user to complete the cleanup.
Modify the password reset at next logon setting for local users
When you create a local user, you may forget to turn on Users must reset the password at next logon., or the feature may already be enabled and you need to disable it. In either case, you can follow these steps to modify the setting.
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
-
In the user list, select the target user. At the bottom of the list, choose .
-
In the drop-down list of the dialog box that appears, select Enable or Disable based on your requirements, and then click OK.
FAQ
How do I reset the password of a Bastionhost administrator account if it is lost?
If the password of a Bastionhost administrator is lost, you can reset it in Privileged Access Management (PAM).
-
Log on to the PAM console.
-
In the left-side navigation pane, choose User Management.
-
In the user list, find the target administrator user, click the More icon (three dots) in the Actions column, and choose Change User Password. Then complete the password reset by following the on-screen instructions.