rlm_linelog

2005-02-17 Thread Drew Weaver








    Im not sure anyone has any experience with this
module yet, but I thought I’d ask since there isn’t any
documentation and I really wouldn’t know where to look for this
information. It appears from my fumbling around in the .c file that this module
is looking for two different parameters; one is ‘filename’ the
other is ‘format’ filename is fairly straightforward, format
however is not. I have no idea what my “options” are for formatting
the strings it is outputting. Does anyone have any hints on this.. All I really
would like it to do is print

 

[$username/$password]

 

Shouldn’t be too hard, however I don’t really
know how to “tell it to do that”.

 

Anyone hit me with the cluebat? You guys have been really
helpful, I just need this one last little push, and I can be done with this
nightmarish project.

 

Thanks,

-Drew

 








rlm_linelog & locking

2009-04-21 Thread Phil Mayers
It appears rlm_linelog doesn't lock the file before writing to it. 
Should it? Won't lines get interspersed at high logging rates if not?

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


Re: rlm_linelog

2005-02-17 Thread Kostas Kalevras
On Thu, 17 Feb 2005, Drew Weaver wrote:
   Im not sure anyone has any experience with this module yet,
but I thought I'd ask since there isn't any documentation and I really
wouldn't know where to look for this information. It appears from my
fumbling around in the .c file that this module is looking for two
different parameters; one is 'filename' the other is 'format' filename
is fairly straightforward, format however is not. I have no idea what my
"options" are for formatting the strings it is outputting. Does anyone
have any hints on this.. All I really would like it to do is print

[$username/$password]

Shouldn't be too hard, however I don't really know how to "tell it to do
that".
Whatever is supported by the xlat function. Check out doc/variables.txt

Anyone hit me with the cluebat? You guys have been really helpful, I
just need this one last little push, and I can be done with this
nightmarish project.

Thanks,
-Drew


--
Kostas Kalevras Network Operations Center
[EMAIL PROTECTED]   National Technical University of Athens, Greece
Work Phone: +30 210 7721861
'Go back to the shadow' Gandalf
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: rlm_linelog

2005-02-17 Thread Alan DeKok
"Drew Weaver" <[EMAIL PROTECTED]> wrote:
> Im not sure anyone has any experience with this module yet,
> but I thought I'd ask since there isn't any documentation and I really
> wouldn't know where to look for this information. It appears from my
> fumbling around in the .c file that this module is looking for two
> different parameters; one is 'filename' the other is 'format' filename
> is fairly straightforward, format however is not. I have no idea what my
> "options" are for formatting the strings it is outputting. Does anyone
> have any hints on this.. All I really would like it to do is print

  The format is a string where variables are expanded, just like the
filename.

  format = "%{User-Name} logged in from %{NAS-IP-Address} with %{NAS-Port}"

  Alan DeKok.


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


RE: rlm_linelog

2005-02-17 Thread Drew Weaver

  The format is a string where variables are expanded, just like the
filename.

  format = "%{User-Name} logged in from %{NAS-IP-Address} with
%{NAS-Port}"


Alan, 

I am a little confused..

Even though my format is just this:

format = "%{User-Name}"

My log the contents of filename is:

Packet-Type = Access-Request
Thu Feb 17 14:18:39 2005
User-Name = "aweaver"
User-Password = "1234"
NAS-IP-Address = 209.190.0.72
Client-IP-Address = 209.190.0.72
Stripped-User-Name = "aweaver"
Realm = "NULL"
Realm = "NULL"
Proxy-State = 0x34

Any clues?

-Drew


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


RE: rlm_linelog

2005-02-17 Thread Drew Weaver
Alan, 

I am a little confused..



Don't really like replying to my own dreck, but I figured out why it
wasn't displaying the username, then I realized there isn't a variable
for passwords. Is there some way to get the password?

Basically I just need like.

format = "[%{User-Name}/%{Password}]"

So each line in my logfile will just be [username/password]

looking in doc/variables.txt I don't see a variable for passwords, but I
know it has to be somewhere because if you do a radiusd -X it shows
there in the request and you can log it by setting a config setting in
radiusd.conf

Im really close to getting this thing to work.

Thanks for any advice.

-Drew

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


Re: rlm_linelog

2005-02-17 Thread Alan DeKok
"Drew Weaver" <[EMAIL PROTECTED]> wrote:
> Don't really like replying to my own dreck, but I figured out why it
> wasn't displaying the username, then I realized there isn't a variable
> for passwords. Is there some way to get the password?

  From where?  If you mean the password in the Access-Request, it's a
normal RADIUS attribute, called User-Password.  This is visible in
debug mode.

  Alan DeKok.

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


Re: rlm_linelog

2005-02-17 Thread Thor Spruyt
Drew Weaver wrote:
Basically I just need like.
format = "[%{User-Name}/%{Password}]"
format = "[%{User-Name}/%{User-Password}]"
--
Groeten, Regards, Salutations,
Thor Spruyt
M: +32 (0)475 67 22 65
E: [EMAIL PROTECTED]
W: www.thor-spruyt.com
www.salesguide.be
www.telenethotspot.be
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: rlm_linelog & locking

2009-04-21 Thread Alan DeKok
Phil Mayers wrote:
> It appears rlm_linelog doesn't lock the file before writing to it.
> Should it? Won't lines get interspersed at high logging rates if not?

  IIRC, using O_APPEND, and writing small amounts means that the writes
are "all or nothing".  i.e. The OS takes care of ensuring that the write
succeeds.

  This means that lines from different threads will get put into the log
file in arbitrary order.  But the lines *won't* be split in the middle.

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


Re: rlm_linelog & locking

2009-04-21 Thread Phil Mayers

Alan DeKok wrote:

Phil Mayers wrote:

It appears rlm_linelog doesn't lock the file before writing to it.
Should it? Won't lines get interspersed at high logging rates if not?


  IIRC, using O_APPEND, and writing small amounts means that the writes
are "all or nothing".  i.e. The OS takes care of ensuring that the write
succeeds.


Ah - I see man 2 write says:

"""If the file was open(2)ed with O_APPEND, the file offset is first set 
to the end of the file before writing.  The adjustment of the file 
offset and the write operation are performed as an atomic step..."""


...and goes on to list the (few) circumstances under which the number of 
bytes written is < number of bytes in buffer - basically, signals or out 
of disk space.


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


rlm_linelog and syslog over UDP

2011-03-25 Thread Stefan Winter
Hi,

are there any plans to add logging to *remote* syslog servers to the
rlm_linelog module? Would be kinda cute; we want to log authentication
results to a central statistics collection host - and going through
re-send on the local syslog instance is a superfluous extra step.

Greetings,

Stefan Winter

-- 
Stefan WINTER
Ingenieur de Recherche
Fondation RESTENA - Réseau Téléinformatique de l'Education Nationale et de la 
Recherche
6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg

Tel: +352 424409 1
Fax: +352 422473




signature.asc
Description: OpenPGP digital signature
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Re: rlm_linelog and syslog over UDP

2011-03-25 Thread Alan DeKok
Stefan Winter wrote:
> are there any plans to add logging to *remote* syslog servers to the
> rlm_linelog module? Would be kinda cute; we want to log authentication
> results to a central statistics collection host - and going through
> re-send on the local syslog instance is a superfluous extra step.

  I see what you mean, but that involves writing a module which opens a
UDP socket to a remote syslog server, and then creates syslog-formatted
messages.  That's probably not hard (~500 lines?), but not a priority
right now.

  RFC 5424 also says that TCP/TLS should be preferred to UDP for sending
to remote machines.

  So sure.. send a patch. :)

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


Re: rlm_linelog and syslog over UDP

2011-03-26 Thread Alexander Clouter
Alan DeKok  wrote:
>
>> are there any plans to add logging to *remote* syslog servers to the
>> rlm_linelog module? Would be kinda cute; we want to log authentication
>> results to a central statistics collection host - and going through
>> re-send on the local syslog instance is a superfluous extra step.
> 
>  I see what you mean, but that involves writing a module which opens a
> UDP socket to a remote syslog server, and then creates syslog-formatted
> messages.  That's probably not hard (~500 lines?), but not a priority
> right now.
>
I am unsure why something like syslog-ng could not just be installed and 
do the syslog'ing instead today?  You can either use the file/pipe 
source drivers to do whats needed.
 
>  RFC 5424 also says that TCP/TLS should be preferred to UDP for sending
> to remote machines.
>
...queuing, message drop,tail/head drop, it's not trivial.

Cheers

-- 
Alexander Clouter
.sigmonster says: Better late than never.
-- Titus Livius (Livy)

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