<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/xsl/installation.xsl" type="text/xsl"?>
<xml>
  <title>FreeRADIUS - Authenticating against eDirectory</title>
  <section>
    <name>Install FreeRADIUS</name>
    <operatingsystem>
      <name>OES / SuSE Linux</name>
      <step order='1'>Open YaST.</step>
      <step order='2'>Click on "Install and Remove Software".</step>
      <step order='3'>Type "freeradius" (without the quotes) in the search box.</step>
      <step order='4'>Click the "Search" button.</step>
      <step order='5'>Place a checkmark in the package for freeradius.</step>
      <step order='6'>Click the "Accept" button.</step>
    </operatingsystem>
    <operatingsystem>
      <name>other operating systems</name>
      <notes>Installing FreeRADIUS should be simple and straightforward.  However, if there are questions about installing FreeRADIUS on a system other than OES or SuSE linux, please consult the operating system vendor or the FreeRADIUS manual.</notes>
    </operatingsystem>
  </section>
  <section>
    <name>Configure eDirectory</name>
    <step order='1'>Locate the "LDAP Group" object for the server that will authenticate the users.</step>
    <step order='2'>View the properties.</step>
    <step order='3'>Click on the "Attribute Mappings" tab.</step>
    <step order='4'>Click the "Add" button.</step>
    <step order='5'>Add an "NDS Attribute" of "RADIUS:Enable Dial Access".</step>
    <step order='6'>In the "Primary LDAP Attribute" box, enter "dialupAccess".</step>
    <step order='7'>Click the "OK" button.</step>
    <step order='8'>NOTE : If FreeRADIUS will be using an anonymous bind (no identity specified in FreeRADIUS configuration file), the public pseudo user must be given rights to the "RADIUS:Enable Dial Access" attribute.  If this attribute is not returned to FreeRADIUS because the public user does not have rights, no user will authenticate.</step>
    <step order='9'>Refresh NLDAP by unloading and reloading NLDAP at the servers console.</step>
  </section>
  <section>
    <name>Configure FreeRADIUS</name>
    <step order='1'>Copy the /etc/raddb/radiusd.conf to another location so that a backup is present.</step>
    <step order='2'>Open the /etc/raddb/radiusd.conf file.</step>
    <step order='3'>Locate the modules section by searching for the line "modules {".</step>
    <step order='4'>In that section, locate the ldap section (search for ldap).</step>
    <step order='5'>Change the "server" setting to point to the eDirectory LDAP server that was previously configured.</step>
    <step order='6'>If anonymous binds are not allowed, change the "identity" and "password" settings for an appropriate eDirectory account (one with rights to "dialupAccess" or "RADIUS:Enable Dial Access"), and remove the pound sign in front of them.</step>
    <step order='7'>Change the "basedn" setting to point to the top organization in the tree (e.g. "o=novell").</step>
    <step order='8'>If TLS/SSL is a requirement on the server, add a "port = 636" line to the ldap section, and a "tls_mode = yes".  These two configuration directives are not listed by default, but allow you to force SSL on the LDAP connection from the start.</step>
    <step order='9'>"default_profile" and "profile_attributes" are optional settings for obtaining profile information from the LDAP server.</step>
    <step order='10'>Locate the authorize section start by searching for the line "authorize {".</step>
    <step order='11'>In that secion, uncomment the line for "ldap".</step>
    <step order='12'>Locate the authenticate section start by searching for the line "authenticate {".</step>
    <step order='13'>That section also has a "unix" option.  Comment this out.</step>
    <step order='14'>A few lines below that, it will have three lines for an "Auth-Type LDAP" subsection - uncomment those lines.</step>
    <step order='15'>Save and close the file.</step>
    <step order='16'>Open the /etc/raddb/users file.</step>
    <step order='17'>Locate the line setting for "DEFAULT Auth-Type = System".</step>
    <step order='18'>Change the setting from "System" to "LDAP".</step>
    <step order='19'>Comment out the "Fall-Through = 1" line immediately below that.</step>
  </section>
  <section>
    <name>Test FreeRADIUS</name>
    <step order='1'>Start FreeRADIUS by typing the command "/etc/init.d/radiusd start".</step>
    <step order='2'>Send a test RADIUS packet using the command "radtest username password localhost 0 testing123".</step>
    <step order='3'>View the results.</step>
    <step order='4'>If you have problems, stop radius (using "/etc/init.d/radiusd stop"), and restart radius in debug mode (by running "radiusd -X") and try the radtest command again.</step>
    <step order='5'>Also, additional information may be available using DSTRACE with the LDAP option on the eDirectory server.</step>
    <step order='6'>If everything looks good on the FreeRADIUS side, you can mimmick the LDAP search to see what is returned by using the ldapsearch command (e.g. : "ldapsearch -D cn=admin,o=novell -W -h ldap.server.com -s sub -x -b o=novell '(uid=testuser)'").</step>
  </section>
  <section>
    <name>Group-Enabled LDAP using FreeRADIUS</name>
    <step order='1'>Change the DEFAULT Auth-Type in the /etc/raddb/users file to Reject instead of LDAP.</step>
    <step order='2'>Duplicate the DEFAULT section.</step>
    <step order='3'>On the first DEFAULT entry, change Auth-Type to LDAP.</step>
    <step order='4'>On the first DEFAULT entry, change Fall-Through to "no" or 0.</step>
    <step order='5'>On the first DEFAULT entry (and before the Auth-Type), insert a new parameter of "Ldap-Group == ", followed by the group name in quotes, followed by a comma.</step>
    <step order='6'>Remove the attribute mapping in the "LDAP Group - SERVER" object for "RADIUS:Enable Dial Access" to "dialupAccess".</step>
    <step order='7'>Restart the FreeRADIUS service (/etc/init.d/radiusd restart).</step>
  </section>
  <section>
    <name>FreeRADIUS getting too many responses because of aliases</name>
    <step order='1'>Open the /etc/raddb/radiusd.conf file.</step>
    <step order='2'>Locate the "ldap" section.</step>
    <step order='3'>Locate the "filter" configuration element.</step>
    <step order='4'>Insert "(&amp;(objectClass=inetOrgPerson)" on the front of your filter, and add ")" to the end of it.  For example: filter = "(&amp;(objectClass=inetOrgPerson)(uid=%{Stripped-User-Name:-%{User-Name}}))"</step>
    <step order='5'>Restart the FreeRADIUS service (/etc/init.d/radiusd restart).</step>
  </section>
  <section>
    <name>Setting up FreeRADIUS and eDirectory for 802.1X Authentication</name>
    <step order='1'>Prepare eDirectory by ensuring the schema is ready for Universal Password (the Schema should have nspmPassword and nspmPasswordKey attributes)</step>
    <step order='2'>Enable Universal Password.</step>
    <step order='3'>Locate the password policy you are using in your security container.</step>
    <step order='4'>On the "other" tab for it, locate the "nspmConfigurationOptions" attribute.</step>
    <step order='5'>Ensure that the attribute has the 0x20 (hexidecimal) bit set.  This allows an administrator to retrieve the nspmPassword* attributes required.</step>
    <step order='6'>Add the switch or access point that will be attempting the 802.1X authentication to the /etc/raddb/clients.conf file.</step>
    <step order='7'>Create the necessary dictionary files the switch/access point will require in the /etc/raddb/dictionary file.</step>
    <step order='8'>Open the /etc/raddb/radiusd.conf file.</step>
    <step order='9'>Locate the ldap configuration (just search for the "ldap {" section).</step>
    <step order='10'>Set the server to an appropriate LDAP server for eDirectory.</step>
    <step order='11'>Set the identity to an administrative account (e.g. cn=admin,o=novell).</step>
    <step order='12'>Set the password for the above specified account.</step>
    <step order='13'>Set the Base DN to the container where you want to start looking for users.</step>
    <step order='14'>Comment out the "start_tls = yes" and add a "tls_mode = yes".</step>
    <step order='15'>Add a "port = 636" setting.  (This and the previous options are designed to force the entire connection over SSL/TLS, a requirement for retrieving the nspmPassword* attributes).</step>
    <step order='16'>Set the "password_attribute" option to "nspmPassword".</step>
    <step order='17'>Set the "edir_account_policy_check" option to "yes".</step>
    <step order='18'><i>*optional*</i> If not using the dialAccess attribute, create an option "access_attr_used_for_allow" with a value of "no".</step>
    <step order='19'>Locate the "authorize {" section in the same file.</step>
    <step order='20'>Uncomment the "ldap" option in there.</step>
    <step order='21'>Locate the "authenticate {" section.</step>
    <step order='22'>Uncomment the "Auth-Type LDAP" section (3 lines).</step>
    <step order='23'>Open the /etc/raddb/users file.</step>
    <step order='24'>Create a new line : "DEFAULT Auth-Type := EAP" .</step>
    <step order='25'><i>*optional*</i> If your clients are sending a domain with them, add a '<b>, Prefix == "DOMAIN\\", Strip-User-Name = Yes</b>' to the line.</step>
    <step order='26'>Add any VLAN/Tunnelling/Default attributes you wish returned to the radius client (configured in step 7)</step>
    <step order='27'>Restart radiusd (/etc/init.d/radiusd stop &amp;&amp; /etc/init.d/radiusd start)</step>
    <step order='28'>Test the authentication.</step>
  </section>
  <notes>There is a difference between the radiusd binary and the radiusd startup script in the /etc/init.d/ directory.  If you use the startup script, you will need to use only parameters for start, stop, or restart.  If using the binary, you have the option of using any parameters and switches that the 'man radiusd' will show.</notes>
  <notes>If you have eliminated anonymous binds, you will need to set the "identity" and "password" settings in the radiusd.conf file.</notes>
  <notes>If you have requirements for TLS for all operations, you will need to set the "start_tls" option to "yes".</notes>
  <notes>RADIUS:Profile objects in eDirectory will have an objectClass attribute of "radiusprofile", and that can easily get in the way of some profile attributes on user accounts.  You can change what information is returned on the "LDAP Group" object's "Attribute Mappings" tab.</notes>
  <notes>The option is available if desired to filter on objectClass's.  The setting in the radiusd.conf file is "base_filter".  This can be used to require certain attributes, or objectClass values (e.g. "(objectClass=iFolderUser)").</notes>
</xml>

