Complete Contents
Introduction
Chapter 1 Introducing RADIUS
Chapter 2 Initializing and Configuring RADIUS
Chapter 3 Using Deja to Update RADIUS Information
Chapter 4 RADIUS/LDAP Information Mapping
Chapter 5 Command & File Reference
Appendix A Mapping Syntax and Semantics
RADIUS Extension Guide: Initializing and Configuring RADIUS
Previous Next Contents Index


Chapter 2 Initializing and Configuring RADIUS

This chapter explains how to start using RADIUS with the Netscape Directory Server. It explains the initialization process and the configuration tasks you can perform.

This chapter includes the following sections:


Initializing RADIUS
When you initialize the RADIUS server, both authentication and accounting are enabled. There are two separate dsradiusd processes for authentication and accounting.

A setup script, setup_rad, guides you through the initialization process. The setup_rad script performs the following tasks:

Depending on how you set up your Netscape Directory Server, configuration information and user information is not necessarily stored in the same LDAP database. The setup_rad script takes this into account.

You will need to understand and prepare the information you must supply to the setup_rad script. The script prompts you for:

  1. The full name of the machine on which you will run the RADIUS server
  2. The format is hostname.domainName.

  3. The LDAP URL for the configuration directory.
  4. This is the URL to the directory that holds the configuration information. It is not necessarily the same as the directory that holds user information. The format of the URL is ldap://hostname.domainName:portNumber/.

  5. The installation directory for the Netscape Directory Server.
  6. The DN of the directory manager for the Netscape Directory Server.
  7. The DN you provide must be the same as the one you provided in the setup script for the Netscape Directory Server. This DN has all permissions on the Netscape Directory Server. By default, it is cn=Directory Manager.

  8. The password of the directory manager for Netscape Directory Server.
  9. The name of the administration domain managed by the server.
  10. The LDAP URL for the user directory.
  11. If you use the same directory to hold configuration information and user information, this URL is the same as the one you supplied earlier.

  12. The password and DN of the directory manager for the user directory if different from the configuration directory.
  13. The DN of the subtree under which the RADIUS server must perform searches for remote user and NAS authentication.
To initialize RADIUS, follow these steps:

  1. Make sure that the SUNWdsrad and SUNWdsutl packages are installed. For example, type:
  2. % pkginfo SUNWdsrad SUNWdsutl

    This command should return the name and description of the packages. If you need to install the packages, refer to Solaris Extensions Installation Guide.

  3. Make sure that the directory server daemon ns-slapd and the admin server daemon ns-admin are running. For example, type:
  4. % ps -ef | grep ns-

    The listing returned by this command should contain the following lines:

    root 8371 1 0 16:03:13 ? 0:00 ./ns-admin -d /usr/netscape/server4/admin-serv/config

    root 8375 1 0 16:03:42 ? 0:05 ./ns-slapd -f /usr/netscape/server4/slapd-faerie/config/slapd.conf -i /usr/nets

    If it doesn't you must start the ns-slapd daemon, as explained in the Netscape Directory Server Administrator's Guide.

  5. Run the RADIUS setup script, setup_rad. As root, type:
  6. # /opt/SUNWconn/ldap/sbin/setup_rad

  7. Start the Netscape Console.
  8. In the left pane of the Console, browse down the tree to the RADIUS server, and double click on the icon to open the RADIUS console.
  9. In the RADIUS console window, from the Task tab, select Start RADIUS Server.
Your RADIUS server is initialized and configured. If you want to change configuration parameters at any time, refer to "Configuring RADIUS".


Configuring RADIUS
The RADIUS service can be configured in two ways:

Starting the RADIUS Console

To start the RADIUS console:

  1. Start the Netscape Console.
  2. In the left pane of the Console, browse down the tree to the RADIUS server, and double click on the icon to open the RADIUS console.
  3. The RADIUS console is displayed

To access the main configuration panel, in the RADIUS tree view on the left, select Common, then click the Configuration tab. The configuration panel contains fields for all the parameters described in "Editing RADIUS Configuration Files".

Information on how to perform advanced configuration tasks from the RADIUS console is provided with each task description in this chapter.

Editing RADIUS Configuration Files

The RADIUS configuration is stored in the following files:

Note. When you modify the RADIUS configuration by editing one of these files, you must restart or refresh the RADIUS daemon. You can do this from the Tasks tab on the RADIUS console.

radius.mapping File

The following configuration parameters are defined in the radius.mapping file:

Note. Blocking mode and dynamic accounting settings are not taken into account when the RADIUS search is performed on a referral server.

Whenever you modify the radius.mapping file, you must run the dejasync utility to copy the modifications you made to the Deja.properties file. Your modifications will not be reflected in Deja if you don't use dejasync.

dsradiusd.conf File

The following configuration parameters are defined in dsradiusd.conf:


Advanced Configuration of RADIUS Searches
You can perform the following advanced configuration tasks:

These tasks are performed by modifying the DN and the search filters that the RADIUS server uses to do searches in the directory.

The subtrees searched by the RADIUS server are specified in the radius.mapping file by the BaseDN variable. The BaseDN variable for remote users is located in the Common section under the USERS table. The BaseDN variable for NAS devices is located in the Common section under the RAS table.

For example, in the Common section of the Users table, the BaseDN is similar to:

BaseDN= o=airius, c=us

The actual value of this attribute is supplied during the setup_rad process.

The object classes and attributes that are used in RADIUS searches are specified in the mapping file by the FILTER variable. The FILTER variable for remote users is located in the Dynamic section under the USERS table. The FILTER variable for NAS devices is located in the Dynamic section under the RAS table.

For example, in the Dynamic section of the USERS table, the FILTER is:

FILTER=(&(Objectclass=remoteUser)(uid=$UserID))

In these examples, the RADIUS server searches for the userid passed in the request from the NAS in the subtree o=airius, c=us among all entries with an object class of remoteUser.

Note. The syntax of filters is described in RFC 2254 The String Representation of LDAP Search Filters.

Providing Temporary Access to Users

The basic configuration for RADIUS searches on remote users is defined in the radius.mapping file, under the USERS table. The variables that define the search criteria are:

BaseDN= search_base

FILTER=(&(Objectclass=remoteUser)(uid=$UserID))

Where:

search_base is the subtree that is searched for entries with the remoteUser object class.

$UserID represents the actual userid passed in the request from the NAS.

Without changing your basic configuration, you can allow temporary access to a remote user whose entry is in a different subtree.

Editing the Mapping File

  1. In the USERS table, add a BaseDN and FILTER token to the configuration with the prefix TMP_ , and assign temporary values, using the following format:
  2. TMP_BaseDN = new_search_base

    TMP_FILTER = (&(Objectclass=remoteUser)(uid=$UserID)(uid=userid))

    where:

    new_search_base is the subtree that holds the remoteUser entry for the person to whom you are granting temporary access. If this subtree is stored on a different server, ensure that a referral is defined between the two servers

    userid is the actual userid of the remote user. This ensures that you grant access to that user alone, and not to all the entries with the object class remoteUser in the new search base

  3. Restart the dsradiusd daemon so that the new configuration file is taken into account. As root, type the following commmands:
  4. # /opt/SUNWconn/ldap/sbin/dsradius stop

    # /opt/SUNWconn/ldap/sbin/dsradius start

For example, if your Base DN for remote users is l=Paris, o=airius, c=US, and you want to provide temporary access to the remote user Felipe Gonzalez located in Madrid, you would change the local radius.mapping file to include:

BaseDN= l=Paris, o=airius, c=us

TMP_BaseDN= l=Madrid, o=airius, c=us

FILTER=(&(Objectclass=remoteUser)(uid=$UserID))

TMP_FILTER=(&(Objectclass=remoteUser)(uid=$UserID)(uid=fgonzalez))

This example assumes that a referral exists between the local directory server and the directory server holding the subtree l=Madrid, o=airius, c=US.

If you want to temporarily extend permission to all remote users within the Airius corporation, you would use the following temporary base DN variable:

TMP_BaseDN= o=airius, c=us

This example assumes that there is a default referral from the server that holds the l=Paris, o=airius, c=us subtree to the server that holds the o=airius, c=us subtree. It also assumes that the o=airius, c=us subtree contains referral entries to all subtrees held on other servers.

Using the RADIUS Console

To perform the same operation from the RADIUS console:

  1. In the RADIUS tree view on the left, select Users, then select the Configuration | Common tab.
  2. Add a TMP_BaseDN variable. Do not remove the current BaseDN variable.
  3. Select the Configuration | Dynamic tab.
  4. Add a TMP_FILTER variable . Do not remove the current FILTER variable.
  5. Select the Tasks tab and click Refresh.
For details about the TMP_BaseDN and TMP_FILTER variables, refer to "Editing the Mapping File".

Restricting Access through a Specified NAS

You may want to ensure that remote users always connect to a specific NAS. For example, if you want to control communications costs, you can ensure they connect to the NAS that is geographically closest to them.

The basic configuration for RADIUS searches on NAS devices is defined in the radius.mapping file, under the RAS table. The variables that define the search criteria are:

BaseDN= search_base

FILTER=(&(Objectclass=remoteUser)(uid=$UserID))

Editing the Mapping File

  1. In the USERS table, add a BaseDN and FILTER token to the configuration with the suffix _nasname, and assign temporary values.
  2. BASEDN_nasname= search_base

    FILTER_ nasname= (&(Objectclass=remoteUser)(uid=$UserID))

    where:

  3. Restart the dsradiusd daemon so that the new configuration file is taken into account. As root, type the following commmands:
  4. # /opt/SUNWconn/ldap/sbin/dsradius stop

    # /opt/SUNWconn/ldap/sbin/dsradius start

For example, your Base DN for remote users is l=France, o=airius, c=us, and you have remote users located in Paris, Lyon, and Toulouse who can connect to the network through a local NAS at each site. The NAS names are ParisNAS, LyonNAS, and ToulouseNAS, respectively. You want to ensure that remote users always connect through the nearest NAS to save on communication costs.

You would change the radius.mapping file to include:

BaseDN= l=France, o=airius, c=us

BaseDN_ParisNAS= l=Paris, l=France, o=airius, c=us

BaseDN_LyonNAS= l=Lyon, l=France, o=airius, c=us

BaseDN_ToulouseNAS= l=Toulouse, l=France, o=airius, c=us

FILTER=(&(Objectclass=remoteUser)(uid=$UserID))

When the RADIUS server receives a request from ParisNAS, it checks that the remote user belongs to the naming context l=Paris, l=France, o=airius, c=us.

Using the RADIUS Console

To perform the same operation from the RADIUS console:

  1. In the RADIUS tree view on the left, select NAS, then select the Configuration | Common tab.
  2. Add a BaseDN_nasname variable. Do not remove the current BaseDN variable.
  3. nasname is the name of the NAS (value of the cn attribute in the directory entry for the NAS) through which you are granting access.

  4. Select the Configuration | Dynamic tab.
  5. Add a FILTER_nasname variable. Do not remove the current FILTER variable.
  6. nasname is the name of the NAS (value of the cn attribute in the directory entry for the NAS) through which you are granting access.

  7. Select the Tasks tab and click Refresh.
For details about the BaseDN_nasname and FILTER_nasname variables, refer to "Editing the Mapping File".

Combining Temporary Access and NAS Restriction

You can combine temporary access permission and restrict access to a particular NAS by combining the TMP_ prefix and _nasname suffix on the BaseDN or the FILTER tokens.

For example, if you want to grant Felipe Gonzalez from Madrid remote access to the Paris NAS just for the duration of a business trip to Paris, you would modify the radius.mapping file to include the following lines in the Dynamic section of the USERS table:

BaseDN= l=France, o=airius, c=us

TMP_BaseDN= l=Madrid, o=airius, c=us

FILTER=(&(Objectclass=remoteUser)(uid=$UserID))

TMP_FILTER_ParisNAS=(&(Objectclass=remoteUser)(uid=$UserID)(uid=fgonzal ez))

In this example, the _nasname suffix is added to the temporary filter rather than to the temporary base DN. The reason is that you may want to grant other people from the Madrid office access through a different NAS from the Paris NAS. In this case, the temporary base DN remains valid, you just need to create the temporary filter with the appropriate _nasname suffix.

Managing Virtual Domains

You can manage remote user connections from users who belong to a virtual domain, that is, a domain that you manage on behalf of another organization.

For example, if ABC corporation decided to use ISP corporation to manage their internet mail service, ABC would be assigned a domain name such as abc.com, and a pool of IP addresses. ISP corporation manages user information, and remote user connections for ABC corporation. When an employee from ABC corporation connects to request remote access, the connection parameters are the user login and the user password.

For example, John Smith logs in with the following parameters:

The RADIUS server of ISP corporation needs to separate the user ID from the domain information. This is done in the radius.mapping file. The beginning of the USERS table and the variables defined in the Dynamic section would be as follows:

Table: USERS

Common:

BaseDN= o=isp, c=us

Dynamic

userID=>$myID@$virtualDomainT || $myID

FILTER=(&(Objectclass=remoteUser)(uid=$myID))

In this configuration example, the userID variable accepts two alternative expressions so that it can handle equally well remote users who have a domain name appended to their user ID, and those who do not.

The domain name must be checked during the authentication procedure, therefore the directory entry of John Smith includes these attributes:

The grpCheckInfo attribute gives the list of attributes that must be supplied in the authentication procedure. The RADIUS server checks the values provided for these attributes against the values stored in the directory database.

Processing Order for RADIUS Search Parameters

During a search, the RADIUS server handles the BaseDN and FILTER tokens in the following manner: it first performs an ordinary search, then, if this search fails, it performs a search on temporary tokens.

The ordinary search starts from the most restrictive to the most general:

  1. FILTER_nasname
  2. FILTER
  3. BaseDN_nasname
  4. BaseDN
If the ordinary search fails, the temporary search is handled in the same way:

  1. TMP_FILTER_nasname
  2. TMP_FILTER
  3. TMP_BaseDN_nasname
  4. TMP_BaseDN
Specifying a Dictionary File

The RADIUS server uses a dictionary file to convert numerical values used by the protocol to attribute names used in the radius.mapping file and the RADIUS log files. The dictionary file contains RADIUS attribute and numerical value pairs. A number of these attributes are defined in RFC 2138 Remote Authentication Dial In User Service (RADIUS), and RFC 2139 RADIUS Accounting. However, NAS vendors have also defined proprietary attributes, referred to as vendor-specific attributes or VSAs.

Do not confuse the RADIUS dictionary file with the RADIUS mapping file which provides a translation between RADIUS attributes and LDAP attributes. For information on the RADIUS mapping file, refer to Chapter  4, "RADIUS/LDAP Information Mapping."

Solaris Extensions for Netscape Directory Server 4.11 provide a default dictionary that contains the standard attribute and value definitions. It also accepts the dictionaries from the following vendors:

The dictionary files provided by vendors contain both standard and proprietary definitions. Attribute and value definitions are identified by an OID which is the actual information passed in a RADIUS transaction. Due to a lack of standardization some proprietary attributes defined by different vendors use the same OID.

The RADIUS server can support any number of dictionary files from different vendors, but you must specify which dictionary to use with a particular NAS.

To specify a dictionary file for a NAS, use the Deja tool to add the dictionaryFile attribute to the directory entry for the NAS. The value you assign to this attribute must be the filename of the dictionary that the RADIUS server must use for communications with the NAS described by the entry.

If the dictionaryFile attribute is not specified, the default dictionary file is used. This file, called dictionary, is located with all other configuration files under /etc/opt/SUNWconn/ldap/current.

Note. If you use the dictionary provided by the NAS vendor instead of the default dictionary provided with Solaris Extensions for Netscape Directory Server 4.11, you must copy the attributes used internally by the RADIUS server from the default dictionary to the vendor-supplied dictionary. The list of attributes that you must copy is shown in the following file extract.

Table 2.1 RADIUS Server Internal Attributes

# Non-Protocol Attributes
# These attributes are used internally by the server
#
ATTRIBUTE Expiration 21 date
ATTRIBUTE Auth-Type 1000 integer
ATTRIBUTE Menu 1001 string
ATTRIBUTE Termination-Menu 1002 string
ATTRIBUTE Prefix 1003 string
ATTRIBUTE Suffix 1004 string
ATTRIBUTE Group 1005 string
ATTRIBUTE Crypt-Password 1006 string
ATTRIBUTE Connect-Rate 1007 integer
#
# SUN RADIUS Attributes for LDAP Integration
#
ATTRIBUTE Login-Profile 2000 integer
ATTRIBUTE Login-Passwd 2001 string
ATTRIBUTE Login-Expiration 2002 date
ATTRIBUTE PPP-Profile 2010 integer
ATTRIBUTE PPP-Passwd 2011 string
ATTRIBUTE PPP-Expiration 2012 date
ATTRIBUTE SLIP-Profile 2020 integer
ATTRIBUTE SLIP-Passwd 2021 string
ATTRIBUTE SLIP-Expiration 2022 date
ATTRIBUTE Auth-Failed-Access 2100 integer
ATTRIBUTE Dynamic-Session-Counter 2201 integer
ATTRIBUTE Dynamic-SessionId 2202 string
ATTRIBUTE Dynamic-IPAddress 2203 ipaddr
ATTRIBUTE Dynamic-IPAddr-Binding 2204 string
ATTRIBUTE PAM-Service-Name 2205 string

Configuring Dynamic Accounting

You can use the RADIUS server to record connection parameters dynamically in the directory entry of a remote user. To enable dynamic accounting, in the RADIUS Console, set the Dynamic Data option to On.

With dynamic accounting enabled, the following attributes are automatically added to a remote user's entry when the user connects, and removed when the user disconnects:

Note. When a remote user has several open sessions, the dynamic session counter attribute is removed from the user's entry when the user has closed all running sessions.

A default accounting file is provided with Solaris Extensions for Netscape Directory Server 4.11, called acctattr. You can, if you want, create your own dynamic accounting file. The only requirement is that the file name should end with the attr suffix.

You must make sure that the NAS can provide the accounting parameters listed in the accounting file. This file should be located with other configuration files in /etc/opt/SUNWconn/ldap/current.

The dynamic accounting parameters listed in the default acctattr file are RADIUS attributes that can be contained in RADIUS accounting packets. The corresponding LDAP attributes are shown in Table  4.1.

The default acctattr file contains examples of suitable RADIUS attributes commented out. These are:

If you want to add accounting items to the list, ensure that:

  1. At least one NAS can provide these items in an accounting packet.
  2. There is an LDAP attribute for each RADIUS parameter that you want to record.
  3. If there isn't, you must create the corresponding LDAP attribute, as explained in "Creating a Dynamic Accounting Attribute".

  4. The mapping between the RADIUS attribute and the LDAP attribute is defined in the radius.mapping file.
  5. If it isn't, you must create it as described in "Creating a Dynamic Accounting Attribute".

Creating a Dynamic Accounting Attribute

To create a dynamic accounting attribute, and the RADIUS/LDAP mapping definition:

  1. Create an LDAP attribute for the connection parameter that you want to record.
  2. This is a modification of the Netscape Directory Server schema. For information on how to create new attributes in the directory server schema, refer to the Netscape Directory Server Administrator's Guide.

  3. Add the attribute to the list in the radius.mapping file using a text editor.
  4. Make sure you add it in both the Import section and the Export section of the mapping file. You need to be logged in as root to perform this operation.

    Alternatively, you can add the attribute from the RADIUS console: In the RADIUS tree view on the left, select Users, then select the Configuration | Import tab. Add the attribute in the Import section of the radius.mapping file. Then select the Configuration | Export tab to add the attribute to the Export section

  5. Add the attribute to the list in the accounting file using a text editor.
  6. You need to be logged in as root to perform this operation.

    Alternatively, you can add the attribute from the RADIUS console: In the RADIUS tree view on the left, select Users, then select the Configuration | Accounting tab. Select the accounting file that you want to modify and click Load.

  7. Restart the ns-slapd daemon so that the new accounting attribute created in the schema is taken into account and can be recorded dynamically in remote user entries.
  8. Restart the dsradiusd daemon so that the new radius.mapping file is taken into account.
  9. To do this from the RADIUS console, from the Tasks tab, select Refresh.

Specifying an Accounting File for a NAS

To specify an accounting file for a NAS, use the Deja tool to add the acctattrFile attribute to the directory entry for the NAS. The value you assign to this attribute must be the filename of the dynamic accounting attribute file that the RADIUS server uses to record the dynamic accounting information received from the NAS.

If the acctattrFile attribute is not specified, the default acctattr file is used. This file is located with all other configuration files under /etc/opt/SUNWconn/ldap/current.

ACLs on RADIUS Information

RADIUS information in the LDAP directory is protected by a special ACI. The instruction specifies a filter for the RADIUS object classes, the list of RADIUS attributes to which the instruction applies, a name for the instruction, the permission level, and the LDAP URL used by the RADIUS server to perform searches and modifications in the LDAP directory.

The default ACI on RADIUS information is shown below.

# SUN Radius Attribute Control Item

#

aci:

(targetfilter="(|(objectclass=nas)(objectclass=remoteUser))")

(targetattr="*")

(version 3.0;aci "Radius User permissions"; allow(all) userdn="ldap:///cn=radiusAdmin,o=sun.com";)

Note. Note that the default ACI gives the RADIUS administrator all permissions on all attributes (targetattr="*"). You can if you want, restrict the attributes which the RADIUS administrator can access by listing them in the ACI. If you modify the default ACI, make sure that your list of attributes contains at least the userPassword attribute.


RADIUS Server Statistics
This section lists the information collected by the RADIUS server SNMP agent dsnmprad. This information can be monitored from a management platform such as Solstice Enterprise Manager, Solstice Site Manager, or Solstice Domain Manager.

Information Collected

The information collected by the dsnmprad SNMP agent is defined in RFC 2619 RADIUS Authentication Server MIB and RFC 2621 RADIUS Accounting Server MIB.

The following RADIUS authentication service information is monitored:

The following RADIUS accounting service information is monitored:

Displaying RADIUS Server Statistics

You cannot display RADIUS server statistics in the RADIUS console. You need a management application such as Solstice Enterprise Manager, Solstice Domain Manager, or Solstice Site Manager. The files required to interoperate with these management applications are provided with Solaris Extensions for Netscape Directory Server 4.11:


Configuring RADIUS to Use PAM
This section describes how to enable PAM on top of the RADIUS server. The procedure given in this section is based on a sample PAM plug-in provided in the directory /opt/SUNWconn/ldap/samples/pam. This example PAM module can be used by the RADIUS server to authenticate, authorize and perform accounting for remote users.

  1. Change directory to the /opt/SUNWconn/ldap/samples/pam directory.
  2. Make the PAM module by typing make in this directory. Ignore the warning messages displayed at the end of the make process.
  3. Copy the PAM module pam_sample.so.1 to /usr/lib/security/ and make sure it is owned by root.
  4. In the RADIUS console, go to the main configuration panel and enable the use of PAM: check the PAM enabled checkbox, and specify a challenge reponse timeout in the Challenge/Resp Timeout field. A reasonable value is 60.
  5. Alternatively, you can edit the radius.mapping file in the directory /etc/opt/SUNWconn/ldap/current/mapping/ to add the following lines to the Common section:

    Pam_Authentication=on

    Challenge_Response_Timeout=60

  6. Modify the /etc/pam.conf configuration file to include the following lines:
  7. # Radius

    radius auth required /usr/lib/security/pam_sample.so.1

    radius account required /usr/lib/security/pam_sample.so.1

    radius session required /usr/lib/security/pam_sample.so.1

    radius password required /usr/lib/security/pam_sample.so.1

  8. Modify the entries of remote users in the directory to include the following attributes and values:
  9. pamServiceName: radius

    grpCheckInfo: pamServiceName

    The pamServiceName attribute specifies the name of the PAM module to use in /etc/pam.conf. The grpCheckInfo attribute usually also contains the userPassword attribute. If you remove userPassword, then only PAM authentication is used.

  10. Restart the dsradiusd daemon so that the new radius.mapping file is taken into account.
  11. To do this from the RADIUS console, from the Tasks tab, select Refresh.

 

Copyright © 1999 Sun Microsystems, Inc. Some preexisting portions Copyright © 1999 Netscape Communications Corporation