Hi,

is this a typo ?

"\host\login.server.domain.com" to "username"      <<< backslash

DEFAULT    Prefix == "/host", Strip-User-Name = Yes <<< slash?

Regards,

Edvin Seferovic

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jérémy
Cluzel
Sent: Freitag, 02. September 2005 02:05
To: freeradius-users@lists.freeradius.org
Subject: Removing prefix and suffix from User-Name

Hi,

I want to convert the User-Name recieved: 
"\host\login.server.domain.com" to "username".
What's the best way to do this ?

- using preprocess module and "hints" file:
DEFAULT    Prefix == "/host", Strip-User-Name = Yes
DEFAULT    Suffix == ".server.domain.com", Strip-User-Name = Yes

- using "proxy.conf" file:
realm server.domain.com {
    type        = radius
    authhost    = LOCAL
    accthost    = LOCAL
}

- using realm module:
    realm test {
        format = suffix
        delimiter = "."
        ignore_default = no
        ignore_null = no
    }

- using attr_rewrite module:
    attr_rewrite saneUserName {
        attribute = User-Name
        searchin = packet
        searchfor = "^(+.).server.domain.com"
        replacewith = "%{1}"
        ignore_case = yes
        new_attribute = no
        max_matches = 1
        append = no
    }

- or using preprocess module and "hints" file:
DEFAULT    Prefix == "/host", Strip-User-Name = Yes
DEFAULT    Suffix == ".server.domain.com", Strip-User-Name = Yes

Regards,

Jeremy
- 
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to