Re: checkrad always returning 0?
for one thing, download latest release 0.9 something and try the checkrad which comes inside... then did you set etc/clients.conf and etc/naspasswd ? what did you set ? the important thing is nastype login and password ... what kind of nas do you have? etc. if you use snmp, did you try to see manually if you can connect to nas? do you have ucd snmp... and blah blah, and if you use telnet is Net::Telnet installed? perl module... Ray wrote: trying to setup Simultaneous-Use and it is working so far, but i haven't succesfully setup checkrad with it. using freeRadius 0.8.1 checkrad -d netserver xx.xx.xx.4 366 user 22544538 and it keeps outputting Returning 0 (login ok) even when the user is on. i'm using MySQL for accounting and using NASIPAddress NASPortId UserName AcctSessionId from radacct for the paramaters to test checkrad what should i check or change to get that working? - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: checkrad always returning 0? Solved
turns out that the nas is using HiPer for a prompt so i had to modify the code to look for that prompt. before it was looking for just the two lines i ended up changing in the end are: $telnet = new Net::Telnet (Timeout = 10, Prompt = '/HiPer\\/'); while ($curprompt ne HiPer\\) { ($curline, $curprompt) = $telnet-waitfor ( String = HiPer\\, Timeout = 5); i'm not the ones who setup these NASs so i'm not sure if the prompt is something someone set to just be cute. but it works now. and the co-workers telling me they are USR/Total Contol are part right, some of them are some are other USRs, so i still have some poking around to do before i'll actually get it working correctly. but that is a completely different problem. Ray wrote: trying to setup Simultaneous-Use and it is working so far, but i haven't succesfully setup checkrad with it. using freeRadius 0.8.1 checkrad -d netserver xx.xx.xx.4 366 user 22544538 and it keeps outputting Returning 0 (login ok) even when the user is on. i'm using MySQL for accounting and using NASIPAddress NASPortId UserName AcctSessionId from radacct for the paramaters to test checkrad what should i check or change to get that working? - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: checkrad always returning 0?
On Wednesday 06 August 2003 22:13, you wrote: for one thing, download latest release 0.9 something and try the checkrad which comes inside... then did you set etc/clients.conf and etc/naspasswd ? what did you set ? the important thing is nastype login and password ... what kind of nas do you have? etc. if you use snmp, did you try to see manually if you can connect to nas? do you have ucd snmp... and blah blah, and if you use telnet is Net::Telnet installed? perl module... etc/clients.conf and etc/naspassword are setup, but since i'm only calling checkrad manually at this point, only the naspassword file has any affect. i was getting an error about bad password before setting up naspassword, but the error message and documentation already got me past that problem. nas: i'm told it is USR/Total Control, but when i manually telnet into it and mimic the commands of the tc module, it doesn't do what it should. but the commands in the module for netserver are correct, so i'm using that. as for Net::Telnet, it is installed (3.02) snmp isn't being used since i'm not using a nas that checkrad needs snmp for, i'm not sure which version of snmp i have, but it doesn't seem like that would matter in this case where the modules are using telnet to check the nas. Ray wrote: trying to setup Simultaneous-Use and it is working so far, but i haven't succesfully setup checkrad with it. using freeRadius 0.8.1 checkrad -d netserver xx.xx.xx.4 366 user 22544538 and it keeps outputting Returning 0 (login ok) even when the user is on. i'm using MySQL for accounting and using NASIPAddress NASPortId UserName AcctSessionId from radacct for the paramaters to test checkrad what should i check or change to get that working? - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: checkrad always returning 0? Solved
oh yes, I missed that damn, but you can better look for in the line anywhere... should be like this (I think) Prompt = '/\/'); so perhaps that way it would work whatever the NAS name is... If you have different names in different NASes that would be nasty :) Evnren Ray wrote: turns out that the nas is using HiPer for a prompt so i had to modify the code to look for that prompt. before it was looking for just the two lines i ended up changing in the end are: $telnet = new Net::Telnet (Timeout = 10, Prompt = '/HiPer\\/'); while ($curprompt ne HiPer\\) { ($curline, $curprompt) = $telnet-waitfor ( String = HiPer\\, Timeout = 5); i'm not the ones who setup these NASs so i'm not sure if the prompt is something someone set to just be cute. but it works now. and the co-workers telling me they are USR/Total Contol are part right, some of them are some are other USRs, so i still have some poking around to do before i'll actually get it working correctly. but that is a completely different problem. Ray wrote: trying to setup Simultaneous-Use and it is working so far, but i haven't succesfully setup checkrad with it. using freeRadius 0.8.1 checkrad -d netserver xx.xx.xx.4 366 user 22544538 and it keeps outputting Returning 0 (login ok) even when the user is on. i'm using MySQL for accounting and using NASIPAddress NASPortId UserName AcctSessionId from radacct for the paramaters to test checkrad what should i check or change to get that working? - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: checkrad always returning 0?
did you realize these? # uncomment this if you use the standard # prefixes #$user =~ s/^[PSC]//; #$user =~ s/\.(ppp|slip|cslip)$//; you can perhaps put print($user); right after these and you should see all the users in the nas from the output also you might figure out what is wrong dont put it inside the if clause though :) well you can let us know what you get? what does the output of list connections command look like? Evren Ray wrote: On Wednesday 06 August 2003 22:13, you wrote: for one thing, download latest release 0.9 something and try the checkrad which comes inside... then did you set etc/clients.conf and etc/naspasswd ? what did you set ? the important thing is nastype login and password ... what kind of nas do you have? etc. if you use snmp, did you try to see manually if you can connect to nas? do you have ucd snmp... and blah blah, and if you use telnet is Net::Telnet installed? perl module... etc/clients.conf and etc/naspassword are setup, but since i'm only calling checkrad manually at this point, only the naspassword file has any affect. i was getting an error about bad password before setting up naspassword, but the error message and documentation already got me past that problem. nas: i'm told it is USR/Total Control, but when i manually telnet into it and mimic the commands of the tc module, it doesn't do what it should. but the commands in the module for netserver are correct, so i'm using that. as for Net::Telnet, it is installed (3.02) snmp isn't being used since i'm not using a nas that checkrad needs snmp for, i'm not sure which version of snmp i have, but it doesn't seem like that would matter in this case where the modules are using telnet to check the nas. Ray wrote: trying to setup Simultaneous-Use and it is working so far, but i haven't succesfully setup checkrad with it. using freeRadius 0.8.1 checkrad -d netserver xx.xx.xx.4 366 user 22544538 and it keeps outputting Returning 0 (login ok) even when the user is on. i'm using MySQL for accounting and using NASIPAddress NASPortId UserName AcctSessionId from radacct for the paramaters to test checkrad what should i check or change to get that working? - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: checkrad always returning 0? --
well what I would do is printing something else to test if the checkrad script is working until there. like print(hello); :) and then just before $telnet-print(list connections); you can put like sleep(60); so it will sleep 60 seconds so you can see if your user is already inside this netserver thing :) never seen one so...if its not there then you can be sure that checkrad is having trouble. If the user is not there but hello prints then you will know there is a problem with the telnet connection. you can not print $curline because its an array... you can try foreach $line (@curline) { print($line); } this would print each element of the currline array so after you test these you can return back to me :) by the way my icq number is 913003 if you would prefer that. well I just canceled my previous email after I pressed send because there was a semicolon missing after print :) just be careful... Evren Ray wrote: On Wednesday 06 August 2003 23:44, you wrote: did you realize these? # uncomment this if you use the standard # prefixes #$user =~ s/^[PSC]//; #$user =~ s/\.(ppp|slip|cslip)$//; we aren't using prefixes as far as i know. you can perhaps put print($user); right after these and you should see all the users in the nas from the output also you might figure out what is wrong dont put it inside the if clause though :) well you can let us know what you get? tried putting a print $user in different places, and for some reason they don't print anything. but then i don't know perl, so i might be doing this wrong too. while ($curprompt ne \) { ($curline, $curprompt) = $telnet-waitfor ( String = \, Timeout = 10); $ok = $telnet-print(); push @curlines, split(/^/m, $curline); print($curline); } ... # # Check to see if $user is already connected # print($user); if ($user eq $ARGV[3]) { and i modified the print statement about user not found just to make sure i'm editing the correct module and file. (and i am) what does the output of list connections command look like? HiPer list connections CONNECTIONS Start Start IfName User Name Type DLL DateTime slot:1/mod:1jd613 DIALIN PPP 06-AUG-2003 13:58:58 slot:1/mod:2david DIALIN PPP 06-AUG-2003 08:50:36 slot:1/mod:3allonmy DIALIN PPP 06-AUG-2003 11:03:46 Ray wrote: On Wednesday 06 August 2003 22:13, you wrote: for one thing, download latest release 0.9 something and try the checkrad which comes inside... then did you set etc/clients.conf and etc/naspasswd ? what did you set ? the important thing is nastype login and password ... what kind of nas do you have? etc. if you use snmp, did you try to see manually if you can connect to nas? do you have ucd snmp... and blah blah, and if you use telnet is Net::Telnet installed? perl module... etc/clients.conf and etc/naspassword are setup, but since i'm only calling checkrad manually at this point, only the naspassword file has any affect. i was getting an error about bad password before setting up naspassword, but the error message and documentation already got me past that problem. nas: i'm told it is USR/Total Control, but when i manually telnet into it and mimic the commands of the tc module, it doesn't do what it should. but the commands in the module for netserver are correct, so i'm using that. as for Net::Telnet, it is installed (3.02) snmp isn't being used since i'm not using a nas that checkrad needs snmp for, i'm not sure which version of snmp i have, but it doesn't seem like that would matter in this case where the modules are using telnet to check the nas. Ray wrote: trying to setup Simultaneous-Use and it is working so far, but i haven't succesfully setup checkrad with it. using freeRadius 0.8.1 checkrad -d netserver xx.xx.xx.4 366 user 22544538 and it keeps outputting Returning 0 (login ok) even when the user is on. i'm using MySQL for accounting and using NASIPAddress NASPortId UserName AcctSessionId from radacct for the paramaters to test checkrad what should i check or change to get that working? - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: checkrad always returning 0?
On Wednesday 06 August 2003 23:44, you wrote: did you realize these? # uncomment this if you use the standard # prefixes #$user =~ s/^[PSC]//; #$user =~ s/\.(ppp|slip|cslip)$//; we aren't using prefixes as far as i know. you can perhaps put print($user); right after these and you should see all the users in the nas from the output also you might figure out what is wrong dont put it inside the if clause though :) well you can let us know what you get? tried putting a print $user in different places, and for some reason they don't print anything. but then i don't know perl, so i might be doing this wrong too. while ($curprompt ne \) { ($curline, $curprompt) = $telnet-waitfor ( String = \, Timeout = 10); $ok = $telnet-print(); push @curlines, split(/^/m, $curline); print($curline); } ... # # Check to see if $user is already connected # print($user); if ($user eq $ARGV[3]) { and i modified the print statement about user not found just to make sure i'm editing the correct module and file. (and i am) what does the output of list connections command look like? HiPer list connections CONNECTIONS Start Start IfName User Name Type DLL DateTime slot:1/mod:1jd613 DIALIN PPP 06-AUG-2003 13:58:58 slot:1/mod:2david DIALIN PPP 06-AUG-2003 08:50:36 slot:1/mod:3allonmy DIALIN PPP 06-AUG-2003 11:03:46 Ray wrote: On Wednesday 06 August 2003 22:13, you wrote: for one thing, download latest release 0.9 something and try the checkrad which comes inside... then did you set etc/clients.conf and etc/naspasswd ? what did you set ? the important thing is nastype login and password ... what kind of nas do you have? etc. if you use snmp, did you try to see manually if you can connect to nas? do you have ucd snmp... and blah blah, and if you use telnet is Net::Telnet installed? perl module... etc/clients.conf and etc/naspassword are setup, but since i'm only calling checkrad manually at this point, only the naspassword file has any affect. i was getting an error about bad password before setting up naspassword, but the error message and documentation already got me past that problem. nas: i'm told it is USR/Total Control, but when i manually telnet into it and mimic the commands of the tc module, it doesn't do what it should. but the commands in the module for netserver are correct, so i'm using that. as for Net::Telnet, it is installed (3.02) snmp isn't being used since i'm not using a nas that checkrad needs snmp for, i'm not sure which version of snmp i have, but it doesn't seem like that would matter in this case where the modules are using telnet to check the nas. Ray wrote: trying to setup Simultaneous-Use and it is working so far, but i haven't succesfully setup checkrad with it. using freeRadius 0.8.1 checkrad -d netserver xx.xx.xx.4 366 user 22544538 and it keeps outputting Returning 0 (login ok) even when the user is on. i'm using MySQL for accounting and using NASIPAddress NASPortId UserName AcctSessionId from radacct for the paramaters to test checkrad what should i check or change to get that working? - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html