No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

OceanStor 18000 V3 Series V300R006

This document is applicable to OceanStor 18500 V3 and 18800 V3. Based on the CLI provided by DeviceManager, this document describes how to use various commands classified by functions and how to set the CLI and manage the storage system through these commands. The document that you browse online matches the latest C version of the product. Click Download to download documents of other C versions.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
change user

change user

Function

The change user command is used to perform operations on users. The operations include resetting passwords, changing user levels, changing user role IDs, forcing users offline, changing passwords upon next login, and modifying user login method.

Format

change user user_name=? { { level=? | role_id=? } * | action=? | password_never_expire=? | login_method_list=? }

Parameters

Parameter

Description

Value

user_name=?

User name.

To obtain the value, run "show user" without parameters. Spaces contained in the user name are expressed in "\s".

level=?

New user level.

The value can be "admin" or "guest", where:

  • "admin": administrator.
  • "guest": read-only user.

role_id=?

New user role ID.

In the system view, you can run the "show role system" command to obtain the system group role. In the vStore view, you can run the "show role vstore" command to obtain the vStore group role.

action=?

Operation performed on the user.

The value can be "reset_password", "offline" or "change_password_next_login", where:

  • "reset_password": The user's password will be reset.
  • "offline": The user will be forced offline.
  • "change_password_next_login": The user must change its password upon next login.

password_never_expire=?

Whether a user password is set to never expire. If this parameter is set to "yes", the password does not expire. If this parameter is set to "no", the password expiration check is performed based on the system security policy.

The value is "yes" or "no", where:

  • "yes": A password never expires.
  • "no": The setting of a password to never expire is cancelled.

login_method_list=?

Valid login method set for a system user.

The value can be one or multiple of "SFTP", "CLI", "Serial", "DeviceManager", and "RESTful", where multiple values are separated by commas (,).

Level

Super administrator

Usage Guidelines

  • Run the "change user user_name=? level=?" command to specify a user's level. This command can only be used to change the levels of administrators and read-only users.
  • Run the "change user user_name=? role_id=?" command to specify a user's role ID. This command can only be used to change the role IDs of administrators and read-only users.
  • Run the "change user user_name=? level=? role_id=?" command to specify a user's level and role ID. This command can only be used to change the levels and the role IDs of administrators and read-only users.
  • Run the "change user user_name=? action=reset_password" command to reset user's passwords. This command can only be used to reset the passwords of administrators and read-only users. If the password of a user is entered incorrectly for three consecutive times within five minutes, the user is forced to log out.
  • Run the "change user user_name=? action=offline" command to force a specified user offline. This command can only be used to force administrators and read-only users offline.
  • Run the "change user user_name=? action=change_password_next_login" command to enable a specified user to change its password upon next login. This command can only be used to enable administrators and read-only users to change their passwords upon next login.
  • Run the "change user user_name=? password_never_expire=yes" command to set a specified user's password to never expire.
  • Run the "change user user_name=? login_method_list=?" command to set a valid login method for a system user.

Example

  • Change the level of "testuser" to read-only and the role ID of "testuser" to "6".
    admin:/>change user user_name=testuser level=guest role_id=6 
    WARNING: You are about to change the user level or role ID. This operation will change the user's operation permission. 
    Suggestion: Before performing this operation, ensure that the selected user level or role ID is correct. 
    Have you read warning message carefully?(y/n)y 
    Are you sure you really want to perform the operation?(y/n)y 
    Command executed successfully.
  • Enable "testuser" to change its password upon next login.
    admin:/>change user user_name=testuser action=change_password_next_login 
    WARNING: You are about to set changing the password at the next login. The user must change the password upon the next login. 
    Suggestion: Before performing this operation, learn about the impact of this operation on the user. 
    Have you read warning message carefully?(y/n)y 
    Are you sure you really want to perform the operation?(y/n)y 
    Command executed successfully.
  • Reset the login password of "testuser".
    admin:/>change user user_name=testuser action=reset_password 
    New password:********** 
    Reenter password:********** 
    Password:********** 
    Command executed successfully.
  • Force "testuser" offline.
    admin:/>change user user_name=testuser action=offline 
    DANGER: You are about to log off the selected user. 
    After this operation, the user can no longer manage the device unless relogs in to the device. 
    Suggestion: Before performing this operation, learn about the impact of this operation on the user. 
    Have you read danger alert message carefully?(y/n)y 
    Are you sure you really want to perform the operation?(y/n)y 
    Command executed successfully.
  • Run "show user user_name=?" to query the new settings.
    admin:/>show user user_name=testuser 
      Name      Level  Status Type Lock Status  Create Time Domain User Group Account Status 
      --------  -----  -------  -----  -----------  -----------------------------  -----------------  ---------- 
      testuser  Guest  Offline  Local  Unlocked     2015-07-29/16:37:30 UTC+08:00  --
  • Set the password of "testuser" to never expire.
    admin:/>change user user_name=testuser password_never_expire=yes 
    Command executed successfully. 
    admin:/>
  • Set the login method of "testuser" to "CLI" and "SFTP".
    admin:/>change user user_name=testuser login_method_list=CLI,SFTP 
    DANGER: You are about to modify the account login method list. 
    This operation will cause the account to fail to log in to the storage array in methods not recorded in the list. 
    Suggestion: Before performing this operation, ensure that the login method configuration is correct. 
    Have you read danger alert message carefully?(y/n)y 
    Are you sure you really want to perform the operation?(y/n)y 
    Command executed successfully.

System Response

None

Translation
Download
Updated: 2019-07-12

Document ID: EDOC1000138390

Views: 237524

Downloads: 150

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next