Related Documentation
Configuring a User Account on a Device Running Junos OS
This topic describes how to log on to a device running Junos OS using a root account and configure a new user account. You can configure an account for your own use or create a test account.
To configure a new user account on the device:
- Log in as root and enter configuration mode:root@host> configure[edit]root@host#
The prompt in brackets ([edit]), also known as a banner, shows that you are in configuration edit mode at the top of the hierarchy.
- Change to the [edit system login] section of
the configuration:[edit]root@host# edit system login [edit system login]root@host#
The prompt in brackets changes to [edit system login] to show that you are at a new level in the hierarchy.
- Now add a new user account:[edit system login]root@host# edit user nchen
This example adds an account nchen (for Nathan Chen).
Note: In Junos OS Release 12.2 and later, user account names can contain a period (.) in the name. For example, you can have a user account named nathan.chen. However, the username cannot begin or end with a period.
- Configure a full name for the account. If the name includes
spaces, enclose the entire name in quotation marks (" " ):[edit system login user nchen]root@host# set full-name "Nathan Chen"
- Configure an account class. The account class sets the
user access privileges for the account:[edit system login user nchen]root@host# set class super-user
- Configure an authentication method and password for the
account:[edit system login user nchenroot@host# set authentication plain-text-password New password: Retype new password:
When the new password prompt appears, enter a clear-text password that the system can encrypt, and then confirm the new password.
- Commit the configuration:[edit system login user nchen]root@host# commit commit complete
Configuration changes are not activated until you commit the configuration. If the commit is successful, a commit complete message appears.
- Return to the top level of the configuration, and then
exit:[edit system login user nchen]root@host# top [edit]root@host# exit Exiting configuration mode
- Log out of the device:root@host> exit % logout Connection closed.
- To test your changes, log back in with the user account
and password you just configured:login: nchenPassword: password--- Junos 8.3-R1.1 built 2005-12-15 22:42:19 UTCnchen@host>
When you log in, you should see the new username at the command prompt.
You have successfully used the CLI to view the device status and perform a simple configuration change. See the related topics listed in this section for more information about the Junos OS CLI features.
![]() | Note: For complete information about the commands to issue to configure your device, including examples, see the Junos OS configuration guides. |