> This simple script shell should be convenient. Just replace the IP
> address of your freeradius server (and the username / password /
> secret if you've changed the default configuration).

What I posted earlier is ugly and could be like this:

#!/bin/sh

# steve authenticates
radclient -x 172.16.16.17 auth testing123 << EOF
User-Name = steve
User-Password = testing
NAS-IP-Address = localhost
NAS-Port = 0
EOF

# steve starts accounting
radclient -x 172.16.16.17 acct testing123 << EOF
NAS-IP-Address = localhost
NAS-Port = 0
NAS-Port-Type = 2
User-Name = steve
Acct-Status-Type = Start
EOF

# steve is doing something else
sleep 1

# steve stops accounting
radclient -x 172.16.16.17 acct testing123 << EOF
NAS-IP-Address = localhost
NAS-Port = 0
NAS-Port-Type = 2
User-Name = steve
Acct-Status-Type = Stop
EOF

-- 
Nicolas Baradakis

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

Reply via email to