<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">Hi All,<br><br>In a continuation to my previous issue about how to reference an LDAP attribute in post-auth, I am now wondering how to iterate through a multi-valued attribute in a perl script I call from post-auth.  In the debug you can see all three values are returned:<br><br>...<br>[ldap] looking for reply items in directory...<br>  [ldap] personType -> Person-Type = "employee"<br>  [ldap] personType -> Person-Type = "fulltime"<br>  [ldap] personType -> Person-Type = "it"<br>...<br><br>The perl module currently has the following code because I can't seem to be able to get any result other than the first, ie "employee", and I really need the other two (possibly more) to do a proper VLAN assignment:<br> <br>while (($att,$val) =
 each(%RAD_REPLY)){<br>                if ($att =~ 'Person-Type'){<br>                        $count++;<br>                        if ($count == 1){<br>                                $one = $val;<br>                        } else
 {<br>                                $two = $val;<br>                        }<br>                }<br>        }<br>        $RAD_REPLY{'Reply-Message'} = "Total: $count, first: $one, second: $two.";<br><br>The results are:<br><br>...<br>   Reply-Message = "Total: 1, first: employee, second: ."<br>...<br><br>I'm no perl expert, but shouldn't I be able to reference all three values with $RAD_REPLY{'Person-Type'}? If not, where are the other values being stored?   I read from the archives that this can be done with 3.X and
 foreach using unlang, but I'm stuck with 2.1.10 at the moment.  Or, do multi-valued attributes need to be defined another way?<br><br>Thanks,<br><br>A.<br><br><br><br><br></div></body></html>