not logged in | [Login]

The rlm_expr module enables 'xlat' handling.

Configuration

See default.

Expansions

expr

Implements the majority of standard expr functions, see the configuration above or man rlm_expr for details.

rand

Returns a random number between 0 and the number passed.

For example:

%{rand:9}

Could expand to:

0,1,2,3,4,5,6,7,8 or 9.

randstr

Expands to a random string of characters. Uses the same pattern characters as the String::Random cpan module.

Returns a random char for each pattern char passed.

Pattern char Expands to
c Any lowercase character [a-z]
C Any uppercase character [A-Z]
n Any digit [0-9]
a Any alpha numeric character [A-Za-z0-9]
! A punctuation character [~`!@$%^&*()-_+={}[]|:;"'.<>?/#,]
. Any printable character
s A "salt" character [A-Za-z0-9./]
h Any binary data (excluding NULL)

For example:

%{randstr:CCcc!ccn}

Could expand to:

UDwp$tj5