I was implementing pam_radius login for some Solaris 10 servers today and I got this error.
Aug 10 20:41:57 server1 sshd[17846]: [ID 801593 auth.debug] pam_radius_auth: DEBUG: getservbyname(radius, udp) returned 0.
Aug 10 20:41:57 server1 sshd[17846]: [ID 801593 auth.error] pam_radius_auth: Failed looking up IP address for RADIUS server radius2
Weird error. Googled and found all kinds on weird solutions including hacking the source code and stuff.
I took a quick look at the source code and realised something – my server had no knowledge of the radius and radacct ports. And it’s actually in the debug message: getservbyname failed. I was mislead by the “Failed looking up IP address for RADIUS server” error message.
Added the following to /etc/services:
radius 1812/udp
radacct 1813/udp
And voila! Simple as that.
Related posts:
August 13th, 2010 on 3:04 am
Thanks for this post! I was having the same prob and could not figure it out. Who would have thought a service needs to be in /etc/services to do resolution!
Curt
September 23rd, 2010 on 8:26 am
Glad it’s helpful. :)
September 17th, 2011 on 12:25 am
Hey Yibi,
Thanks a lot for creating this helpful info. I didn’t find this information on the vendor’s site also, looks like they never tested it on latest solaris 10 ;D
Thanks again.
September 17th, 2011 on 12:53 am
Cool. Glad it helpful. :)