projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70619bb
)
Fix passwords to have even length
author
Alan T. DeKok
<aland@freeradius.org>
Fri, 2 Oct 2009 08:52:44 +0000
(10:52 +0200)
committer
Alan T. DeKok
<aland@freeradius.org>
Fri, 2 Oct 2009 08:52:44 +0000
(10:52 +0200)
scripts/create-users.pl
patch
|
blob
|
history
diff --git
a/scripts/create-users.pl
b/scripts/create-users.pl
index
c3f681a
..
36d6f8a
100755
(executable)
--- a/
scripts/create-users.pl
+++ b/
scripts/create-users.pl
@@
-46,6
+46,9
@@
for ($num=0; $num<$numusers; $num++) {
$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);
printf RAD "User-Name=$username, User-Password=$password,NAS-IP-Address=127.0.0.1,NAS-Port-Id=0\n\n";