Plain text password file
Phil Mayers
p.mayers at imperial.ac.uk
Mon Dec 19 17:46:51 CET 2005
Alexander Lund wrote:
> Can somebody explain howto use rlm_passwd and a textfile with this setup:
> name:password:group
> and so on
> the order can be any way around, spaces can also be present.
Wait: Are you saying that the file you *supply* freeradius may have
spaces in it? That won't work, fix the file (it's not hard). Assuming
that's not what you mean, and a format of:
username:unixCryptPassword:ASingleGroupName
...then this should suffice:
modules {
passwd user_pass_group {
filename = /path/to/file
format = "*User-Name:~Crypt-Password:~Group"
}
pap {
encryption_scheme = crypt
}
}
authorize {
preprocess
user_pass_group
}
authenticate {
Auth-Type PAP {
pap
}
}
...it's so trivial I assume you need more than this. Are you having a
specific problem? If you want to use other schemes such as chap, you may
need the plaintext password, for example:
for username:plaintextPassword:ASingleGroup
modules {
passwd u_g_p {
filename = /path/to/file
format = "*User-Name:~User-Password:~Group"
}
pap {
encryption_scheme = clear
}
chap {
}
}
authorize {
preprocess
u_g_p
chap
pap
}
authenticate {
Auth-Type PAP {
pap
}
Auth-Type CHAP {
chap
}
}
More information about the Freeradius-Users
mailing list