Knowledge Search


How to add a new user on the EX switching platform via CLI

  [KB10902] Show Article Properties

The JUNOS software allows you to add, manage and authenticate users. The following information describes the steps to add a new user on the EX switching platform via CLI.


The steps listed below describe how to log in with a root account and configure a new user account

To configure a user account on the switch:

  1. Log in to the switch with existing user  or default user (root with no password)  and enter configuration mode:  
    root@switch> configure

    The prompt in brackets ([edit]), also known as a banner, shows that you are in configuration edit mode, at the top of the hierarchy.

  2. Change to the [edit system login] section of the configuration:    
    root@host# edit system login
    [edit system login]

    The prompt in brackets changes to [edit system login] to show you are at a new level in the hierarchy.

  3. Now add a new user account:
    [edit system login]
    root@switch# edit user michael

    This example adds an account michael, but you can use any account name.

  4. Configure a full name for the account. If the name includes spaces, enclose the entire name in quotation marks ( " " ): 
    [edit system login user michael]
    root@switch# set full-name "Michael Mike"

  5. Configure an account class. The account class sets the user access privileges for the account. 
    [edit system login user michael]
    root@switch# set class super-user

    The following access privileges are available for the account
    operator        permissions [ clear network reset trace view ]
    read-only       permissions [ view ]
    super-user      permissions [ all ]
    unauthorized    permissions [ none ]

  6. Configure an authentication method and password for the account: 
    [edit system login user michael]
    root@switch# set authentication plain-text-password
    New password:
    Retype new password:

    When the new password prompt appears, enter a clear-text password that the system will encrypt, and then confirm the new password.

  7. Commit the configuration:
    [edit system login user michael]
    root@switch# commit
    commit complete

    Configuration changes are not activated until you commit the configuration. If the commit is successful, a commit complete message appears.

  8. Return to the top level of the configuration, and then exit:  
    [edit system login user michael]
    root@switch# top
    root@switch# exit
    Exiting configuration mode

  9. Log out of the switch:
    root@switch> exit
    % logout Connection closed.

  10. To test your changes, log back in with the user account and password you just configured:
    login: michael
    Password: <password>
    --- JUNOS 9.0-R1.1 built 2008-01-15 22:42:19 UTC

    When you log in, you should see the new username at the command prompt.
Related Links: