Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using CentOS 6.3 and want to enable ssh RADIUS authentication along with Centos system Authentication.

Right now my server is firstly authenticated with RADIUS server. And after system Authentication. I want the server to authenticate with unix credentials first and after that to do authentication via RADIUS.

I'm pretty sure about that I have set something inside the file /etc/pam.d/sshd, but I'm not sure what it is I should set.

The configuration I'm using now is:

auth       required   /lib64/security/
auth include  system-auth
account    required   /lib64/security/ service=system-auth
password   required   /lib64/security/ service=system-auth
session    required   /lib64/security/ service=system-auth

If I use above first RADIUS Authentication then CENTOS System Authentication. What I need is to change this to first CentOS System Authentication then RADIUS Authentication.

share|improve this question

In a pam config, the order matters. If authentication requires the user auth against both system and radius to be successful, move auth include system-auth above auth required /lib64/security/

If not, grab all the auth lines from the system-auth file and copy them to this file. Change any lines you copied from required to sufficient and place them above Comment out or remove the auth include system-auth line.

If pam encounters a sufficient line and it passes, it will log in skipping the remainder, but failure will not immediately abort the authentication process. If it failed, it will try the remaining lines in order.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.