radius.py
Description: application/text
On Tuesday, Aug 19, 2003, at 17:23 Australia/Perth, Ben de Luca wrote:
Where is the code?
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adam Hewitt Sent: Tuesday, 19 August 2003 4:58 PM To: [EMAIL PROTECTED] Subject: [SLUG] radius python script
Hi All,
Being the crap programmer that I am I recently enlisted the help of
StevenK to write a radius web frontend in python, and although I am much
appreciative to Steven for his efforts I am still having a problem and
dont particularly want to bother Steven with my inferior programming and
troubleshooting abilities...this is where you come in.
Would someone mind having a quick look at this program and send me any suggestions/fixes for the problem to which I am about to explain.
The backend is the cistron userlist file (/etc/raddb/userlist) which looks like this:
user1 Password = "pass1" Session-Timeout = 10800, Idle-Timeout = 10800, Fall-Through = 1
user2 Password = "pass2" Session-Timeout = 7200, Idle-Timeout = 7200, Fall-Through = 1
user3 Password = "pass3" Session-Timeout = 10800, Idle-Timeout = 10800, Fall-Through = 1
now the python script reads the file and spews a list of configured
users to the screen with a radio button next to each config. Down the
bottom it allows you to add a new user with defined session and idle
timeouts. The problem is that the script dies in the arse *unless* you
have 2 empty lines at the bottom of the file, but this causes an 'empty'
config in the webpages list. If you then add a new user, it creates a
*new* 'empty' config, creating two empty configs and three empty lines
in the file...This ends in a huge mess of empty lines and radio buttons
on the web page.
Any ideas?
Cheers,
Adam.
-- Adam Hewitt - CCNA, LCP Senior Network Engineer GLOBAL DIAL PTY LTD
PO BOX 829 Claremont, Western Australia 6910 Suite 1/278 Stirling Highway, Claremont WA 6010 Telephone: +61 8 9383 1800 Facsimile: +61 8 9383 2818 Email: [EMAIL PROTECTED] Website: www.globaldial.com ________________________________________________________ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error, please immediately notify us via email at [EMAIL PROTECTED] -------------------------------------------------------
------------------------------------------------------- Adam Hewitt - CCNA, LCP Senior Network Engineer GLOBAL DIAL PTY LTD
PO BOX 829 Claremont, Western Australia 6910
Suite 1/278 Stirling Highway, Claremont WA 6010
Telephone: +61 8 9383 1800 Facsimile: +61 8 9383 2818
Email: [EMAIL PROTECTED] Website: www.globaldial.com
________________________________________________________
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of, or taking of any action in reliance upon, this
information by persons or entities other than the intended
recipient is prohibited. If you have received this email in error,
please immediately notify us via email at [EMAIL PROTECTED]
-------------------------------------------------------
-- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
