Matthew Halliday's Web Blog

 Home
 Blog Achieve
 Software Projects
 Linux
 Documentation
 Downloads
 AtomicMPC
 Distribution Reviews



 
Installing NetGear WG111 USB on Ubuntu

September 9th, 2005

Note:  You need root privledge to complete this tutorial.

You need to download the Windows driver.  This is because NetGear hasn't released Linux Drivers for this model, and the NDISWrapper “wraps” the Windows driver so it is able to be run in Linux.

Unlike Ubuntu, Linspire Five-0 has NDISWrapper installed automatically.  This is a good thing.

Copy the Windows drivers to the /tmp directory and cd into the /tmp directory..

To install the windows driver, type in the terminal:

            ndiswrapper -i ./filename.inf

To check if the driver installed successfully type in the terminal:

            ndiswrapper -l

You will see a whole lot of default drivers, to be safe remove them doing the command for each of them:

            ndiswrapper -e <drivername>

You next need to load the module into the kernel by typing:

            modprobe ndiswrapper

You will see if this worked as the light on the wireless USB should be now lit.

Next you need to boot the module.  Type:

            ndiswrapper -m

And finally type this last few lines:

ifdown eth0
ifconfig wlan0 192.168.1.100
route add default gw 192.168.1.1

This stops the eth0 conflict with the LAN IP addresses

Note:  This is only for LANs that use the 192.168.x.x standard.

Note: As you can see, this is almost the exact procedure to the Ubuntu Wireless install, however I have added/removed parts so it makes it easier.



Using 'sudo' with PHP sites

August 19th, 2005

Requirements:
   Any Linux Distribution with Apache2 and PHP installed
   sudo installed
   TCSH Shell installed

Method:
This procedure is useful as it gives you the power to use sudo from a web interface.  The problem is when using a web interface is that the Linux shell doesn't know of a username.

First, create a script like this.  It is basically giving you the power to use many commands in the terminal on the one line.

setenv USER test && sudo (and the command you will specify later in the sudoers file)
'setenv USER test' changes the username to test (Change to any user on your system).
'sudo' is the command to let normal users use specified root commands.

Next, you will have to add the user specified in the variable to the sudoers file, I think it is in /etc

All you have to do now is in a PHP page, type:

shellexec(tcsh sudoscript);
'tcsh' changes the shell from bash to tcsh.  This is done as bash doesn't have the $USER variable.
'sudoscript' is the script you created earlier.  The script will now execute.



Installing NetGear WG111 USB on Ubuntu

August 5th, 2005

Note:  You need root privledge to complete this tutorial.

You need to download the Windows driver.  This is because NetGear hasn't released Linux Drivers for this model, and the NDISWrapper “wraps” the Windows driver so it is able to be run in Linux.

You firstly need to install NDISWrapper.  To do this you navigate to:

            System -> Administration -> Synaptic Package Manager

and do a search for NDISWrapper.   Once found, tick the checkbox and click apply to install it.  You need your Ubuntu install disc to complete.

To install the windows driver, type in the terminal:

            ndiswrapper -i path/to/the/windows/driver/filename.inf

To check if the driver installed successfully type in the terminal:

            ndiswrapper -l

You next need to load the module into the kernel by typing:

            modprobe ndiswrapper

You will see if this worked as the light on the wireless USB should be now lit.

Next you need to boot the module.  Type:

            ndiswrapper -m

And finally type this last few lines:

ifdown eth0
ifconfig wlan0 192.168.1.100
route add default gw 192.168.1.1

This stops the eth0 conflict with the LAN IP addresses

Note:  This is only for LANs that use the 192.168.x.x standard.