Local User Template Accounts
You use local user 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. These templates are defined locally on the router and referenced by the TACACS+ and RADIUS authentication servers.
When you configure local user templates and a user logs in, the JUNOS software issues a request to the authentication server to authenticate the user's login name. If a user is authenticated, the server returns the local username to the JUNOS software, which then determines whether a local username is specified for that login name
(local-usernamefor TACACS+,Juniper-Local-Userfor RADIUS). If so, the JUNOS software selects the appropriate local user template locally configured on the router. If a local user template does not exist for the authenticated user, the router defaults to theremotetemplate.To configure different access privileges for users who share the local user template account, include the
allow-commandsanddeny-commandscommands in the authentication server configuration file. For information about how to configure access privileges on the authentication server, see Configure Juniper Networks-Specific RADIUS Attributes and Configure Juniper Networks-Specific TACACS+ Attributes.For information about creating user accounts, see Configure User Accounts. For an example of how to configure a template account, see Examples: Configure System Authentication.
To configure the local user template, include the local username and specify the privileges you want to provide to these local users at the
[edit system login user]hierarchy level:[edit]system {login {userlocal-user-name{full-name "local user account";uiduid-value;classclass-name;}}}Local User Template Example:
In this example, you configure the sales and engineering local user templates:
[edit]system {login { user sales {uiduid-value;classclass-name; }user engineering {uiduid-value;classclass-name;}}}Now you configure users
on the TACACS+ authentication server:user = simon {...service = junos-exec {local-user-name = salesallow-commands = "configure"deny-commands = "shutdown"}}user = rob {...service = junos-exec {local-user-name = salesallow-commands = "(request system) | (show rip neighbor)"deny-commands = "<^clear"}}user = harold {...service = junos-exec {local-user-name = engineeringallow-commands = "monitor | help | show | ping | traceroute"deny-commands = "configure"}}user = jim {...service = junos-exec {local-user-name = engineeringallow-commands = "show bgp neighbor"deny-commands = "telnet | ssh"}}When the login users simon and rob are authenticated, they use the sales local user
template. When login users harold and jim are authenticated, they use the engineering local user template.