Bug in create-users.pl
Michael Schwartzkopff
misch at multinet.de
Sat Feb 7 18:41:23 CET 2009
Michael Schwartzkopff schrieb:
> Hi,
>
> First of all: Sorry that I post the bug report here and not in
> bugs.freeradius.org, but that site doen't seem to answer.
>
> create-users.pl create a users file of the form:
> username Cleartext-Password := "some string"
> Class="0x0"
>
> where Class counts from 0x0 on.
>
> When I include radius.users in my users file and start radiusd -X I see:
> (...)
> /usr/local/etc/raddb/radius.users[2]: Parse error (reply) for entry
> kxyd: Hex string is not an even length string.
> /usr/local/etc/raddb/users[42]: Could not open included file
> /usr/local/etc/raddb/radius.users: Permission denied
> Errors reading /usr/local/etc/raddb/users
> /usr/local/etc/raddb/modules/files[7]: Instantiation failed for module
> "files"
> /usr/local/etc/raddb/sites-enabled/inner-tunnel[111]: Failed to find
> module "files".
> /usr/local/etc/raddb/sites-enabled/inner-tunnel[34]: Errors parsing
> authorize section.
> }
> }
>
> When I change the Class to
> Class="0x00"
>
> everything works fine.
>
> Greetings,
>
> Michael.
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
Patch:
--- freeradius-server-2.1.3/scripts/create-users.pl 2008-12-05
16:37:56.000000000 +0000
+++ tmp/create-users.pl 2009-02-07 17:36:08.000000000 +0000
@@ -45,6 +45,9 @@
do { ($char = chr((rand 25)+97))} until $char=~/[A-Za-z]/;
$password .= $char;
}
+ if (length($num)%2==1) {
+ $num="0".$num;
+ }
printf PASS "$username:%s:1001:1001:Name:/dev/null:/dev/null\n",
crypt($password, $password);
printf SHAD "$username:%s:1000:0:99999:7:::\n", crypt($password,
$password);
More information about the Freeradius-Users
mailing list