help w/ pam_radius_auth

Gun Akkor gakkor at
Thu Aug 10 16:47:34 CEST 2006


I am new to the list and a newbie on RADIUS. My problem is 
not directly related to using freeradius, but rather 
accessing a RADIUS server via the pam_radius_auth module. 
Since this module seems to be supported/maintained under 
freeradius, I hope to get some help from the list members.

I have a (cistron-based, running on an Ubuntu box) RADIUS 
server configured w/ IP address Under 
"users" file, there is a default entry to authenticate 
users against the system /etc/passwd file. Under "clients" 
file, there is an entry for IP address w/ a 
shared secret "somesecret". There is a user "gakkor" w/ 
password "dummy" in the /etc/passwd file in the box that 
the server resides. I am running the server in debug mode 
"/usr/sbin/radiusd -sfxxyz -l stdout"

I have a client machine, running a Linux based system. If 
I use the test client "radtest" w/

#> radtest gakkor dummy 101 somesecret

everything works fine. I get the following debug output 
from the server:

radrecv: Packet from host code=1, id=219, 
     User-Name = "gakkor"
     User-Password = 
     NAS-IP-Address =
     NAS-Port = 101
   users: Matched DEFAULT at line 136
   auth: System
Sending Ack of id 219 to
Login OK: [gakkor/dummy] (from nas nas1/S101)

Now, instead of the radtest, I want to use an application 
called "authmanager" which makes a call to the 
pam_sm_authenticate method of the pam_radius_auth module, 
with the same username/password. The "server" file under 
/etc/raddb (on client side) has an entry " 
somesecret". So, the shared secrest are the same both for 
the client and server. The /etc/pam.conf file has an entry

authmanager auth    required 
      /usr/lib/ skip_passwd

However, I see that the password sent to the server 
becomes garbled and authentication fails. Here is the 
output from the server in this scenario....

radrecv: Packet from host code=1, id=94, 
     User-Name = "gakkor"
     User-Password = 
     NAS-IP-Address =
     NAS-Identifier = "authmanager"
     NAS-Port = 229
     NAS-Port-Type = Virtual
     Service-Type = Authenticate-Only
   users: Matched DEFAULT at line 136
   auth: System
Sending Reject of id 94 to
Login incorrect: [gakkor/];:/A@] (from nas nas1/S229)

Notice, that the debug output has unprintable characters 
for password... The syslog message on the client side 

pam_radius_auth: packet from RADIUS server 
fails verification: The shared secret is probably 
This seems like a problem with the MD5 hashing or 
byte-order. The client and server both are little-endian. 
And as far as I can tell from the PAM module code that the 
default case id also litle-endian as far as the byte-order 
is concerned.

Any suggestions as to where I might be going wrong?

Thanks in advance,
Gun Akkor

Staff Scientist,
Patton Electronics, Co.
Gaithersburg, MD
gakkor AT patton DOT com

More information about the Freeradius-Users mailing list