[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Sheflug] executing a program as a certain user from a CGI/perl script
Andrew Basterfield writes:
> OK here's my query
>
> We have a mixed linux/windows LAN in out flat with a Linux intenet
> ip-masq gateway/mailserver/caching DNS. In the past if a user wanted to
> connect the LAN to the internet they would telnet into the gateway and
> run pppd which is suid root. Now I have written a perl cgi script so now
> all the user has to do is point their browser at the server & click on
> the connect or disconnect buttons on the gateway's webpage. This is fine
> except it also allows random internet users outside our LAN to
> disconnect us from the internet also - what I want is a
> username/password login on the webpage (easy with a POST type <form>)
> but how do I run pppd from the perl script with the supplied username &
> password? I tried....
Trying a completely different angle - I use MasqDialer (see
http://w3.cpwright.com) - there are clients for Gnome, Java clients,
command line clients (I use it in cron jobs) Windows, the lot...
I've got the MasqDialer program running on my firewall/gateway box,
listening to requests from the internal network only.
You can configure multiple connections to be dialed, limit connections
to certain users, run scripts on client connection, upon dialing,
after connection, and after disconnection.
It's pretty easy to set up, and runs on port 224 as default. This can
be configured. You can decide which interface(s) to run it on for security.
Very handy wee program.
Baz.
--
Barrie J. Bremner
email: baz at barriebremner.com | OpenPGP ID: 5164F553
http://barriebremner.com/
[Contact information available at website]
"Linux? Is that some kind of MacOS?"
-- BT technical support
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.