Python Pyrad 字典错误
我设置了一些 RADIUS 后端以允许通过 django 的“admin”进行 AD 身份验证。尽管我在使用一些词典时遇到了问题,但我真的不知道我做错了什么。这是我得到的错误:
IOError at /admin/ Errno 2]没有这样的文件或目录:'/home/pl/dictionary.compat'
我安装了pyrad,所以它应该在那里,并且我有一个以下样式的'dic't文件(/home/pl/dict):
#
# Version $Id: dictionary,v 1.1.1.1 2002/10/11 12:25:39 wichert Exp $
.....
$INCLUDE dictionary.compat # compability issues
$INCLUDE dictionary.acc
$INCLUDE dictionary.ascend
$INCLUDE dictionary.bay
....
我在 RADIUS 后端使用的代码:
srv = Client(server=settings.RADIUS_SERVER,
secret=settings.RADIUS_SECRET,
dict=Dictionary("/home/pl/dict"))
有什么想法吗?
I setup some RADIUS backend to allow AD authentication via the 'admin' of django. Alltough i got a problem with some dictionaries, i really don't know what i'm doing wrong. This is the error i got:
IOError at /admin/
Errno 2] No such file or directory: '/home/pl/dictionary.compat'
I installed pyrad, so it should be there and i've got a 'dic't file in the following style (/home/pl/dict):
#
# Version $Id: dictionary,v 1.1.1.1 2002/10/11 12:25:39 wichert Exp $
.....
$INCLUDE dictionary.compat # compability issues
$INCLUDE dictionary.acc
$INCLUDE dictionary.ascend
$INCLUDE dictionary.bay
....
The code i use in the RADIUS backend:
srv = Client(server=settings.RADIUS_SERVER,
secret=settings.RADIUS_SECRET,
dict=Dictionary("/home/pl/dict"))
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
配置文件中的 $INCLUDE 指令旨在添加另一个字典文件中的定义。除非找到额外的字典文件,否则无法创建字典对象。
我的建议是:
- 如果您没有额外的字典文件:注释掉/删除 $INCLUDE 行
- 如果您有额外的词典文件:将它们复制到正确的位置
The $INCLUDE directive in the configuration files is intended to add definitions from another dictionary file. Unless the extra dictionary files are found, the dictionary object cannot be created.
My advice is:
- if you don't have the extra dictionary files: comment out/remove the $INCLUDE lines
- if you have the extra dictionary files: copy them to the right location