[Contents] [Prev] [Next] [Index]


Configure User Accounts

One way for users to access the router CLI is if they have user accounts. (Users can access the router without accounts if you have configured RADIUS or TACACS+ servers as described in User Authentication.) For each account, you define the login name for the user and, optionally, information that identifies the user. After you have created an account, the software creates a home directory for the user.

To create user accounts, include the user statement at the [edit system login] hierarchy level:

 [edit system]
 login {
     user user-name { 
         full-name complete-name; 
         uid uid-value; 
         class class-name; 
         authentication { 
             (encrypted-password "password" | plain-text-password);
             ssh-rsa "public-key";
         }
     }
 }
 

For each user account, you can define the following:

An account for the user root is always present in the configuration. You configure the password for root using the root-authentication statement as described in Configure the Root Password.

Example: Configure User Accounts

Create accounts for four router users, and create an account for the template user "remote." All users use one of the default system login classes.

 [edit]
 system {
     login { 
         user philip { 
             full-name "Philip of Macedonia"; 
             uid 1001; 
             class superuser; 
             authentication {
                 encrypted-password "$1$poPPeY"; 
             }
         }
         user alexander {
             full-name "Alexander the Great";
             uid 1002;
             class view;
             authentication {
                 encrypted-password "$1$14c5.$sBopasdFFdssdfFFdsdfs0";
                 ssh-rsa "8924 37 5678 5678@gaugamela.per";
             }
         }
         user darius {
             full-name "Darius King of Persia";
             uid 1003;
             class operator;
             authentication {
                 ssh-rsa "1024 37 12341234@ecbatana.per";
             }
         }
         user anonymous {
             class unauthorized;
         }
         user remote {
             full-name "All remote users";
             uid 9999;
             class read-only;
         }
     }
 } 



[Contents] [Prev] [Next] [Index]