导航

freeradius安装过程中遇到的一些问题及解决

Posted on 2005-03-08 17:46  TANG  阅读(6660)  评论(7编辑  收藏  举报

freeradius+mysql模式的安装
注意安装mysql的devel版本,为什么呢?因为freerdius的连接模块编译的时候需要用到mysql的链接库和头文件,而只安装server和client的rpm包这些都是没有的。
注意src/modules/rlm_sql/drivers/rlm_sql_mysql下面的makefile,,可以试着先编译这个模块,如果这个模块编译不过去,就需要按照它的提示把它先编译过去,否则你的mysql是连接不上的。

freeradius+openldap模式的安装
按照freeradius的how to ldap的文档进行,注意how to ldap中的RADIUS-LDAPv3.schema文件同freeradius的tar包里的文件不一样,另外还有就是它给出的那个ldif的sample还有点问题,它的第一个unit写错了,应该是organizationalunit。
ldap的认证我的理解还是不够透彻,所以刚开始的时候把写的权限设置得很大。
另外radiusd.conf的ldap模块的配置我的配置为:
 ldap {
  server = "localhost"
  identity = cn=freeradius,ou=admins,ou=radius,dc=mydomain,dc=com
  password = freeradius
  basedn = ou=users,ou=radius,dc=mydomain,dc=com
  filter = "(uid=%{Stripped-User-Name:-%{User-Name}})"
  start_tls = no
  tls_mode = no
  dictionary_mapping = ${raddbdir}/ldap.attrmap
  ldap_cache_timeout = 120
  ldap_cache_size = 0
  ldap_connections_number = 10
  password_attribute = userPassword
  groupname_attribute = radiusGroupName
  groupmembership_filter = (&(uid=%{Stripped-User-Name:-%{User-Name}})(objectclass=radiusprofile))
  groupmembership_attribute = radiusGroupName
  timeout = 3
  timelimit = 5
  net_timeout = 1
  compare_check_items = no
 }
主要就是password的设置啦,注意要对应identity的。
启动radiusd进程就现在就没有什么问题了。
这些最基本得功能就可以实现了,下一步要看看chap是怎么实现得。