< Home

rename (local user view)

Function

The rename command renames a user login name.

Format

rename user-name

Parameters

Parameter Description Value
user-name Specifies the new login name of a user. The value is a case-sensitive string. It supports spaces, but does not support any slashes (/), commas (,), quotation marks ("), question marks (?), or at sign (@). If the login name does not contain any space, its length ranges from 1 to 63. If the login name contains spaces, its length ranges from 3 to 65, and you must enclose the name with double quotation marks ("), for example, "user for test".

Views

Local user view

Default Level

2: Configuration level

Usage Guidelines

After you change the login name of a user, the system automatically updates the policies that reference the user. No manual modification is required. For example, after you change user login name Jack to John. The system automatically replaces Jack with John in all policies.

After the change, the user must use the new login name. Otherwise, the login authentication fails.

Example

# Rename login name Jack to John.

<sysname> system-view
[sysname] user-manage user Jack
[sysname-localuser-jack] rename John
[sysname-localuser-john]
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >