diff -urN mono-orig/etc/inc/system.inc devel/fs/etc/inc/system.inc
--- mono-orig/etc/inc/system.inc	Sun Aug 22 06:41:15 2004
+++ devel/fs/etc/inc/system.inc	Sat Sep 18 22:24:48 2004
@@ -267,6 +267,12 @@
 function system_webgui_start() {
 	global $config, $g;
 	
+	if ( isset($config['system']['webgui']['disable']) ) {
+
+		return 1;
+
+	} else {
+
 	if ($g['booting'])
 		echo "Starting webGUI... ";
 	
@@ -353,6 +359,7 @@
 	}
 	
 	return $res;
+	}
 }
 
 function system_password_configure() {
@@ -516,5 +523,28 @@
 	
 	return 0;
 }
+
+function checkPass ($User,$Pass)
+{
+	$filename="/var/run/htpasswd";
+        $fd = fopen($filename, "r");
+        $file_contents = fread( $fd, filesize( $filename ) );
+        fclose( $fd );
+        $lines = explode ( "\n", $file_contents );
+        $line = $lines[0];
+                list( $username, $password ) = explode( ':', $line );
+                if ($username == $User ){
+                        $salt = substr( $password , 0 , 12 );
+                        $enc_pw = crypt( $Pass, $salt );
+                        if ($password == $enc_pw ) {
+        	                return True;
+                        }else{
+                	        return False;
+                        }
+                }else{
+                	return False;
+                }
+}
+
 
 ?>
diff -urN mono-orig/etc/rc.initial devel/fs/etc/rc.initial
--- mono-orig/etc/rc.initial	Fri Jan 23 14:19:57 2004
+++ devel/fs/etc/rc.initial	Fri Sep 17 12:38:23 2004
@@ -28,9 +28,23 @@
 
 else 
 
+auth=0
+
 # endless loop
 while : ; do
 
+if [ $auth -eq 0 ] ; then
+sleep 5s
+echo
+echo
+read -p "Username: " user
+stty -echo
+read -p "Password: " pass
+stty echo
+auth=`/etc/rc.initial.auth user=$user pass=$pass`
+
+else
+
 # display a cheap menu
 echo
 echo
@@ -41,6 +55,10 @@
 echo "3) Reset webGUI password"
 echo "4) Reset to factory defaults"
 echo "5) Reboot system"
+echo "6) Enable webGUI"
+echo "7) Disable webGUI"
+echo "8) Exit"
 echo
 
 read -p "Enter a number: " opmode
@@ -62,7 +80,21 @@
 5)
 	/etc/rc.initial.reboot
 	;;
+6)
+	/etc/rc.initial.enableWebGUI
+	;;
+7)
+	/etc/rc.initial.diableWebGUI
+	;;
+8)	
+	auth=0
+	;;
 esac
+
+fi
 
 done
 
diff -urN mono-orig/etc/rc.initial.auth devel/fs/etc/rc.initial.auth
--- mono-orig/etc/rc.initial.auth	Wed Dec 31 21:00:00 1969
+++ devel/fs/etc/rc.initial.auth	Thu Sep 16 16:01:35 2004
@@ -0,0 +1,44 @@
+#!/usr/local/bin/php -f
+<?php
+/*
+        rc.initial.auth
+        part of m0n0wall (http://m0n0.ch/wall)
+                                                                                                                                                             
+        Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
+        All rights reserved.
+                                                                                                                                                             
+        Redistribution and use in source and binary forms, with or without
+        modification, are permitted provided that the following conditions are met:
+                                                                                                                                                             
+        1. Redistributions of source code must retain the above copyright notice,
+           this list of conditions and the following disclaimer.
+                                                                                                                                                             
+        2. Redistributions in binary form must reproduce the above copyright
+           notice, this list of conditions and the following disclaimer in the
+           documentation and/or other materials provided with the distribution.
+                                                                                                                                                             
+        THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+        INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+        AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+        AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+        OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+        SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+        INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+        CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+        ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+        POSSIBILITY OF SUCH DAMAGE.
+*/
+                                                                                                                                                             
+        require_once("globals.inc");
+                                                                                                                                                             
+        /* parse the configuration and include all functions used below */
+        require_once("config.inc");
+        require_once("functions.inc");
+
+	if (checkPass($_GET["user"],$_GET["pass"])) {
+		echo "1";
+	}else{
+		echo "0";
+	}
+
+?>
diff -urN mono-orig/etc/rc.initial.diableWebGUI devel/fs/etc/rc.initial.diableWebGUI
--- mono-orig/etc/rc.initial.diableWebGUI	Wed Dec 31 21:00:00 1969
+++ devel/fs/etc/rc.initial.diableWebGUI	Sat Sep 18 22:25:21 2004
@@ -0,0 +1,42 @@
+#!/usr/local/bin/php -f
+<?php
+/*
+        rc.initial.diableWebGUI
+        part of m0n0wall (http://m0n0.ch/wall)
+                                                                                                                                                             
+        Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
+        All rights reserved.
+                                                                                                                                                             
+        Redistribution and use in source and binary forms, with or without
+        modification, are permitted provided that the following conditions are met:
+                                                                                                                                                             
+        1. Redistributions of source code must retain the above copyright notice,
+           this list of conditions and the following disclaimer.
+                                                                                                                                                             
+        2. Redistributions in binary form must reproduce the above copyright
+           notice, this list of conditions and the following disclaimer in the
+           documentation and/or other materials provided with the distribution.
+                                                                                                                                                             
+        THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+        INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+        AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+        AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+        OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+        SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+        INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+        CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+        ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+        POSSIBILITY OF SUCH DAMAGE.
+*/
+                                                                                                                                                             
+        require_once("globals.inc");
+                                                                                                                                                             
+        /* parse the configuration and include all functions used below */
+        require_once("config.inc");
+        require_once("functions.inc");
+
+	$config['system']['webgui']['disable'] = True ;
+	write_config();
+	killbypid("{$g['varrun_path']}/mini_httpd.pid");
+
+?>
diff -urN mono-orig/etc/rc.initial.enableWebGUI devel/fs/etc/rc.initial.enableWebGUI
--- mono-orig/etc/rc.initial.enableWebGUI	Wed Dec 31 21:00:00 1969
+++ devel/fs/etc/rc.initial.enableWebGUI	Sat Sep 18 22:25:12 2004
@@ -0,0 +1,43 @@
+#!/usr/local/bin/php -f
+<?php
+/*
+        rc.initial.auth
+        part of m0n0wall (http://m0n0.ch/wall)
+                                                                                                                                                             
+        Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
+        All rights reserved.
+                                                                                                                                                             
+        Redistribution and use in source and binary forms, with or without
+        modification, are permitted provided that the following conditions are met:
+                                                                                                                                                             
+        1. Redistributions of source code must retain the above copyright notice,
+           this list of conditions and the following disclaimer.
+                                                                                                                                                             
+        2. Redistributions in binary form must reproduce the above copyright
+           notice, this list of conditions and the following disclaimer in the
+           documentation and/or other materials provided with the distribution.
+                                                                                                                                                             
+        THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+        INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+        AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+        AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+        OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+        SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+        INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+        CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+        ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+        POSSIBILITY OF SUCH DAMAGE.
+*/
+                                                                                                                                                             
+        require_once("globals.inc");
+                                                                                                                                                             
+        /* parse the configuration and include all functions used below */
+        require_once("config.inc");
+        require_once("functions.inc");
+
+
+	$config['system']['webgui']['disable'] = False;
+	write_config();
+	system_webgui_start();
+
+?>
