Yubico Forum https://forum.yubico.com/ |
|
PAM Radius and Fedora https://forum.yubico.com/viewtopic.php?f=3&t=86 |
Page 1 of 1 |
Author: | sentwistle [ Mon Jun 09, 2008 4:09 pm ] |
Post subject: | PAM Radius and Fedora |
Has anyone experience of using Radius with Fedora and Yubico? I would like to set up a test server on a corporate network to act as a radius server for a SSL VPN radius client. So I have FreeRadius installed on a Fedora box. I have the demo PAM code compiled. Not too sure where to go with it next. |
Author: | Snow [ Tue Jun 10, 2008 7:48 am ] |
Post subject: | Re: PAM Radius and Fedora |
I have integrated YubiKey with Cisco VPN, FreeRadius and Cisco SSL VPN by following the guide and use the PAM module from Yubico: http://code.google.com/p/yubico-pam/wik ... diusViaPAM Cheers |
Author: | network-marvels [ Thu Nov 20, 2008 8:26 am ] |
Post subject: | Re: PAM Radius and Fedora |
The purpose of this document is to guide readers through the configuration steps to enable two factor authentication using YubiKey and RADIUS server on Linux platform. This document assumes that the reader has advance knowledge and experience in Linux system administration, particularly how to configure PAM authentication mechanism on a Linux platform. Although this configuration guide focuses on configuration of radiusd demon for local authentication using the custom database (we have used /etc/passwd), radiusd can be configured easily to use centralized LDAP database for authentication or any popular directory service by configuring appropriate PAM modules in radiusd pam configuration file.
Successful configuration of the Yubico PAM module to support two factor authentication for RADIUS requires following prerequisites:
2) Complier : GNU GCC complier (http://gcc.gnu.org/) 3) Yubico PAM Module: Yubico PAM Module Version 1.8. It can be downloaded from: http://code.google.com/p/yubico-pam 4) FreeRADIUS: FreeRADIUS Version: 1.1.7. It can be downloaded from : http://freeradius.org/download.html
We assume that freeRADIUS is already installed on the server.
1) Edit the radiusd configuration file “/etc/raddb/radiusd.conf” to make following changes:
b) In “authenticate” section uncomment pam to direct radiusd demon to use pam module for authentication 2) Edit the client configuration file “/etc/raddb/clients.conf” to add sample client for testing 3) Edit the user configuration file “/etc/raddb/users” to make following change: Change "DEFAULT Auth-Type = System" to "DEFAULT Auth-Type = pam" for using pam modules for user authentication B) Installation of pam_yubico module: Build instructions for pam_yubico are available in the README: http://code.google.com/p/yubico-c/sourc ... unk/README C) Configuration of pam_yubico module:
There are two ways of user and YubiKey PublicID (token ID) mapping. It can be either done at administrative level or at individual user level. 1) Administrative Level: In Administrative level, system administrators hold right to configure the user and YubiKey PublicID mapping. Administrators can achieve this by creating a new file that contains information about the username and the corresponding PublicIDs of YubiKey(s) assigned. This file contains user name that is allowed to connect to the system using RADIUS and the PublicID of the YubiKey(s) assigned to that particular user. A user can be assigned multiple YubiKeys and this multi key mapping is supported by this file. However, presently there is no logic coded to detect or prevent use of same YubiKey ID for multiple users. Each record in the file should begin on a new line. The parameters in each record are separated by “:” character similar to /etc/passwd. The contents of this file are as follows: <user name>:<YubiKey PublicID>:<YubiKey PublicID>: …. <user name>:<YubiKey PublicID >:<YubiKey PublicID>:….. e.g.: paul:indvnvlcbdre:ldvglinuddek simon:uturrufnjder:hjturefjtehv kurt:ertbhunjimko The mapping file must be created/updated manually before configuration of Yubico PAM module for RADIUS authentication. Although, user level configuration of pam_yubico is possible, this might not be a desired configuration option in case of radisud demon in most enterprise. D) Configuration of selinux policy to create exception for radiusd demon: Local effective selinux policy must be updated to provide sufficient privileges to radiusd demon on system resources. Please follow the steps below to configure effective selinux policy for radiusd demon:
2) Test the RADIUS authentication with the test case provided in “Testing the configuration” section below 3) As radiusd demon doesn’t have sufficient selinux privileges to access the system resources required for using pam modules, the RADIUS authentication will fail. 4) This will create the logs in either “/var/log/messages” or in “/var/log/audit/audit.log” depending on the selinux configuration. 5) We can use audit2allow utility to provide selinux privileges to radiusd by using following sequence of commands: # audit2allow -m local -l -i /var/log/messages > local.te # checkmodule -M -m -o local.mod local.te # semodule_package -o local.pp -m local.mod # semodule -i local.pp 6) For more selinux policy updating information and explanation of above commands please visit the following website: http://fedora.redhat.com/docs/selinux-f ... #id2961385
Our test environment is as follows:
b) FreeRADIUS Server : FreeRADIUS Version 1.1.7 c) Yubico PAM: pam_yubico Version 1.8 d) "/etc/pam.d/radiusd" file: auth required pam_yubico.so authfile=/etc/yubikeyid id=16 debug auth include system-auth account required pam_nologin.so account include system-auth password include system-auth session include system-auth
We have tested the pam_yubico configuration on following Linux sever platforms:
b) FreeRADIUS Server : FreeRADIUS Version 1.1.7 c) Yubico PAM: pam_yubico Version 1.8 2) Fedora 6:
b) FreeRADIUS Server : FreeRADIUS Version 1.1.7 c) Yubico PAM: pam_yubico Version 1.8 To test the RADIUS two factor authentication with YubiKey, we can use “radtest” radius client. The command is as follows: # radtest <username> <passwd followed by YubiKey generated OTP> <radius-server>:<radius server port> <nas-port-number> <secret [ppphint] [nasname]> e.g.: # radtest test test123vrkvfefuitvflvgufcdlbjufkggukufkebeildbdkkjc 127.0.0.1 0 testing123
The FreeRADIUS server version 1.1.3 seems to have problems regarding memory management and it may result in Segmentation Fault if configured with Yubico PAM module. We recommend using FreeRADIUS server version 1.1.7 or above. |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |