Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring System Authentication for RADIUS, TACACS+, and Password Authentication

The following example shows how to configure system authentication for RADIUS, TACACS+, and password authentication.

In this example, only the user Philip and users authenticated by a remote RADIUS server can log in. If a user logs in and is not authenticated by the RADIUS server, the user is denied access to the router or switch. If the RADIUS server is not available, the user is authenticated using the password authentication method and allowed access to the router or switch. For more information about the password authentication method, see Junos OS Authentication Order for RADIUS, TACACS+, and Password Authentication.

When Philip tries to log in to the system, if the RADIUS server authenticates him, he is given access and privileges for the super-user class. Local accounts are not configured for other users. When they log in to the system and the RADIUS server authenticates them, they are given access using the same user ID (UID) 9999 and the privileges associated with the operator class.

[edit]
system {authentication-order radius; login {user philip {full-name "Philip"; uid 1001; class super-user;}user remote {full-name "All remote users";uid 9999;class operator;}}}

Note: For authorization purposes, you can use a template account to create a single account that can be shared by a set of users at the same time. For example, when you create a remote template account, a set of remote users can concurrently share a single UID. For more information about template accounts, see Overview of Template Accounts for RADIUS and TACACS+ Authentication.

When a user logs in to a device, the user’s login name is used by the RADIUS or TACACS+ server for authentication. If the user is authenticated successfully by the authentication server and the user is not configured at the [edit system login user] hierarchy level, the device uses the default remote template user account for the user, provided a remote template account is configured at the edit system login user remote hierarchy level. The remote template account serves as a default template user account for all users that are authenticated by the authentication server but not having a locally configured user account on the device. Such users share the same login class and UID.

To configure an alternate template user, specify the user-name parameter returned in the RADIUS authentication response packet. Not all RADIUS servers allow you to change this parameter. The following shows a sample Junos OS configuration:

[edit]
system {authentication-order radius; login {user philip {full-name "Philip";uid 1001;class super-user; }user operator {full-name "All operators";uid 9990;class operator;}user remote {full-name "All remote users";uid 9999;class read-only;}}}

Assume your RADIUS server is configured with the following information:

  • User Philip with password “olympia”
  • User Alexander with password “bucephalus” and username “operator”
  • User Darius with password “redhead” and username “operator”
  • User Roxane with password “athena”

Philip would be given access as a superuser (super-user) because he has his own local user account. Alexander and Darius share UID 9990 and have access as operators. Roxane has no template-user override, so she shares access with all the other remote users, getting read-only access.

Published: 2013-08-15