大网数据广告活动
服务器运维问答

SSH fallback to local account if Radius server isn't available

· 52CE 我爱测

I've edited my /etc/pam.d/sshd for Radius authentication; I added this line: auth required pam_radius_auth.so Also, I've commented out the line: @include common-auth Now SSH authentication using Radius is OK if the Radius server …

问题原文

原帖链接 · John · CC BY-SA 3.0

I've edited my /etc/pam.d/sshd for Radius authentication; I added this line:

auth required pam_radius_auth.so

Also, I've commented out the line:

@include common-auth

Now SSH authentication using Radius is OK if the Radius server is UP but if the radius server is down, there's no fallback to use the local linux accounts.

Any suggestions on where to edit the file to allow me fallback to my local linux account when my Radius server fails?

已采纳解答

原帖链接 · Taichi Yanagiya · CC BY-SA 3.0

Enable common-auth (includes pam_unix.so), and change "required" to "sufficient".

auth    sufficient      pam_radius_auth.so
@include common-auth

(2016/05/03 JST) settings for "fallback"

auth    [success=done default=bad authinfo_unavail=bad ignore=ignore]  pam_radius_auth.so localifdown
@include common-auth

Results of pam_radius_auth in the following respective cases:

                       | correct password (in Radius)         | wrong (or UNIX) password
-----------------------+--------------------------------------+-------------------------
Radius Server is alive | PAM_SUCCESS                          | PAM_AUTHINFO_UNAVAIL
-----------------------+--------------------------------------+-------------------------
Radius Server is dead  |             PAM_IGNORE (with localifdown option)
-----------------------+--------------------------------------+-------------------------

As a result:

PAM_SUCCESS          => done (Login success)
PAM_AUTHINFO_UNAVAIL => bad (Login failure)
PAM_IGNORE           => ignore (continue to "common-auth")

There is a note. If the time-out value in pam_radius_auth.conf is too small, it will determine "Radius Server is dead", before receiving the "Access Reject" from the Radius Server.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-04-29)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。