⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 debug.texi

📁 gnu 的radius服务器很好用的
💻 TEXI
📖 第 1 页 / 共 2 页
字号:
@c This is part of the Radius manual.@c Copyright (C) 1999,2000,2001,2002,2003 Free Software Foundation, Inc.@c Written by Sergey Poznyakoff@c See file radius.texi for copying conditions.@comment *******************************************************************@node Problem Tracking, Extensions, Logging, Top@chapter Problem Tracking@cindex Problem Tracking@menu* Rule Tracing::       Tracing rules.* Debugging::          Enabling full debugging information.* Test Mode::          Running radius in test mode.@end menu@comment *******************************************************************@node Rule Tracing@section Rule Tracing@cindex Rule TracingIf you have more than one entry in your @file{users} file it is notalways obvious which of the entries were used for authentication. Theauthentication data flow becomes even harder to understand if thereare some complex rules in the @file{hints} and @file{huntgroups}files.The rule tracing mode is intended to help you find out the exactorder of the rules that each request matched during processing.The mode is toggled by @code{trace-rules} statement in @code{auth}or @code{acct} block of your @file{config} file. When rule tracingmode is on for a given type of requests, @command{radiusd} willdisplay the data flow diagram for each processed request of thistype. The diagram is output on @code{info} logging category,it represents the list of rules in reverse chronological order.Each rule is represented by its location in the form@var{filename}:@var{line}. To make the output more compact, ifseveral rules appear in the same configuration file, their locationsare listed as a comma-separated list of numbers after the file name.Furthermore, if the configuration files have the same path prefix,then only the first file name appears with the full prefix.Here is an example of trace rule diagram:@smallexample@cartoucheOct 31 11:37:17 [28322]: Auth.info: (Access-Request foo 170 bar):rule trace: /etc/raddb/users:157,22,3; huntgroups:72; hints:34@end cartouche@end smallexampleThis diagram means, that the authentication request from server@samp{foo} for user @samp{bar} with ID 170 matched the followingrules@multitable @columnfractions .40 .40@item File name                    @tab Line number@item @file{/etc/raddb/hints}      @tab 34@item @file{/etc/raddb/huntgroups} @tab 72 @item @file{/etc/raddb/users}      @tab 3@item @file{/etc/raddb/users}      @tab 22@item @file{/etc/raddb/users}      @tab 157@end multitableAs a practical example, let's suppose you have the following setup.There are three classes of users:@enumerate 1@itemUsers from group ``root'' are authenticated using system passworddatabase and get rlogin access to the server 192.168.10.1@itemUsers from group ``staff'' are also authenticated using systempassword database, but they are granted only telnet access to theserver 192.168.10.2@itemFinally, the rest of users is authenticated against SQL databaseand get usual PPP access.@end enumerateIn addition, users from the first two classes are accounted usingcustom Scheme procedure @code{staff-acct}.The configuration files for this setup are showed below:Contents of @file{hints}:@smallexample@groupDEFAULT  Group = "root"         Scheme-Acct-Procedure = "staff-acct",                   Hint = "admin"DEFAULT  Group = "staff"         Scheme-Acct-Procedure = "staff-acct",                   Hint = "staff"@end group@end smallexampleContents of file @file{users}:@smallexample@groupDEFAULT Auth-Type = SQL,              Simultaneous-Use = 1        Service-Type = Framed-User,              Framed-Protocol = PPPDEFAULT Hint = "admin",             Auth-Type = System        Service-Type = Login-User,             Login-IP-Host = 192.168.0.1,                           Login-Service = Rlogin             DEFAULT Hint = "staff",              Auth-Type = System,              Simultaneous-Use = 1         Service-Type = Login-User,              Login-IP-Host = 192.168.0.2,              Login-Service = Telnet@end group@end smallexampleNow, let's suppose that user @samp{svp} is in the group@samp{staff} and is trying to log in. However, he fails to do so andin @command{radiusd} logs you see:@smallexample@cartoucheNov 06 21:25:24: Auth.notice: (Access-Request local 61 svp):  Login incorrect [svp]@end cartouche@end smallexample@noindentWhy? To answer this question, you add to @code{auth} block of your@file{config} the statement@smallexampletrace-rules yes;@end smallexample@noindentand ask user @samp{svp} to retry his attempt. Now you see in yourlogs:@smallexample@cartoucheNov 06 21:31:24: Auth.notice: (Access-Request local 13 svp):  Login incorrect [svp]Nov 06 21:31:24: Auth.info: (Access-Request local 13 svp):  rule trace: /etc/raddb/users:1, hints: 5@end cartouche@end smallexample@noindentThis means that the request for @samp{svp} has first matched ruleon the line 1 of file @file{hints}, then the rule on line 1 of file@file{users}. Now you see the error: the entries in @file{users}appear in wrong order! After fixing it your @file{users} looks like:@smallexample@groupDEFAULT Hint = "admin",             Auth-Type = System        Service-Type = Login-User,             Login-IP-Host = 192.168.0.1,                           Login-Service = RloginDEFAULT  Hint = "staff",              Auth-Type = System,              Simultaneous-Use = 1         Service-Type = Login-User,              Login-IP-Host = 192.168.0.2,              Login-Service = Telnet             DEFAULT Auth-Type = SQL,              Simultaneous-Use = 1        Service-Type = Framed-User,              Framed-Protocol = PPP@end group@end smallexampleNow, you ask @samp{svp} to log in again, and see:@smallexample@cartoucheNov 06 21:35:14: Auth.notice: (Access-Request local 42 svp):  Login OK [svp]Nov 06 21:35:14: Auth.info: (Access-Request local 42 svp):  rule trace: /etc/raddb/users:7, hints: 5@end cartouche@end smallexampleLet's also suppose that user @samp{plog} is not listed ingroups ``root'' and ``staff'', so he is supposed to authenticateusing SQL. When he logs in, you see in your logs:@smallexample@cartoucheNov 06 21:39:05: Auth.notice: (Access-Request local 122 plog):  Login OK [svp]Nov 06 21:39:05: Auth.info: (Access-Request local 122 plog):  rule trace: /etc/raddb/users:14@end cartouche@end smallexample@comment *******************************************************************@node Debugging@section Debugging@cindex DebuggingGNU Radius provides extensive debugging features. These are enabledeither by the @option{--debug} (@option{-x}) command line option to@command{radiusd} (@pxref{Invocation}), or by the @code{level}statement in the debug category (@pxref{logging,,logging statement}).Both cases require as an argument a valid debug specification.A debug specification sets the module for which the debugging shouldbe enabled and the debugging level. The higher the level is, the moredetailed information is provided. The module name and level areseparated by an equal sign. If the level is omitted, the highestpossible level (100) is assumed. The module name may be abbreviatedto the first @math{N} characters, in which case the first matching module isselected. Several such specifications can be specified, in which casethey should be separated by commas. For example, the following is avalid debug specification:@smallexample        proxy.c=10,files.c,config.y=1@end smallexample@noindentIt sets debug level 10 for module @code{proxy.c}, 100 for@code{files.c}, and 1 for @code{config.y}.The modules and debugging levels are subject to change from releaseto release. @c The following describes briefly the debugging levels for this release@c of GNU Radius (@value{VERSION}).@c @include debug.texinfo@comment *******************************************************************@node Test Mode@section Test Mode@cindex Test Mode

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -