On 19/12/05, Phil Mayers <[EMAIL PROTECTED]> wrote:
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
   }
}
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
No, the file I supply could have spaces if you needed it to solve my problem.

This is just the thing I need:
username:plaintextPassword:ASingleGroup

Its perfect, but I´d like to know exactly what Im doing so heres another question,
The passwordfile. If Im not thinking completly wrong it shouldn´t have any headers or a fileextension

And do I have to use Chap? or can I use PAP with plain text passwords.

Thanks for the help. If you come to sweden I will buy you enough beers to make you regret coming here ;)



--
When there is no solution, there is no problem.
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to