Supported Platforms
Related Documentation
- LN, SRX Series
- Understanding User Authentication Methods
- Understanding User Accounts
- Understanding Login Classes
- Understanding Template Accounts
- Additional Information
- Administration Guide for Security Devices
Example: Creating Template Accounts
This example shows how to create template accounts.
Requirements
No special configuration beyond device initialization is required before configuring this feature.
Overview
You can create template accounts that are shared by a set of users when you are using RADIUS or TACACS+ authentication. When a user is authenticated by a template account, the CLI username is the login name, and the privileges, file ownership, and effective user ID are inherited from the template account.
By default, Junos OS uses the remote template account when:
- The authenticated user does not exist locally on the device.
- The authenticated user's record in the RADIUS or TACACS+ server specifies local user, or the specified local user does not exist locally on the device.
In this example, you create a remote template account and set the username to remote and the login class for the user as operator. You create a remote template that is applied to users authenticated by RADIUS or TACACS+ that do not belong to a local template account.
You then create a local template account and set the username as admin and the login class as superuser. You use local template accounts when you need different types of templates. Each template can define a different set of permissions appropriate for the group of users who use that template.
Configuration
Creating a Remote Template Account
CLI Quick Configuration
To quickly configure this section of the example, copy the following command, paste it into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the command into the CLI at the [edit] hierarchy level.
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode.
To create a remote template account:
- Set the username and the login class for the user.[edit system login]user@host# set user remote class operator
Results
From configuration mode, confirm your configuration by entering the show system login command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Creating a Local Template Account
CLI Quick Configuration
To quickly configure this section of the example, copy the following command, paste it into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the command into the CLI at the [edit] hierarchy level.
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode.
To create a local template account:
- Set the username and the login class for the user.[edit system login]user@host# set user admin class superuser
Results
From configuration mode, confirm your configuration by entering the show system login command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
![]() | Note: To completely set up RADIUS or TACACS+ authentication, you must configure at least one RADIUS or TACACS+ server and specify a system authentication order. Do one of the following tasks:
|
Verification
Confirm that the configuration is working properly.
Verifying the Template Accounts Creation
Purpose
Verify that the template accounts have been created.
Action
From operational mode, enter the show system login command.
Related Documentation
- LN, SRX Series
- Understanding User Authentication Methods
- Understanding User Accounts
- Understanding Login Classes
- Understanding Template Accounts
- Additional Information
- Administration Guide for Security Devices
Modified: 2013-08-13
Supported Platforms
Related Documentation
- LN, SRX Series
- Understanding User Authentication Methods
- Understanding User Accounts
- Understanding Login Classes
- Understanding Template Accounts
- Additional Information
- Administration Guide for Security Devices