Posts

Web2py / Apache – admin disabled because no admin password

If you are running Web2py on Apache and get this error message when you try to log into the admin interface (/admin):

 

admin disabled because no admin password

 

Then you may have forgotten to provide a password during set-up and will have to provide one now to proceed to the admin screens.

 

To do this you need to can do the following:

 

Stop Apache:

cd to the web2py directory and run web2py.py specifying a new password (greater than 4 characters long?) like this:

Then kill the web2py, e.g. via ctrl-c, and then copy parameters_8000.py to parameters_443.py, like this:

Restart the apache server:

After doing all of this when you visit /admin you should be asked to provide your password and you should be able to login – well it worked for me anyway! ;-)

 

Web2py and Apache running on Raspberry Pi

As part of my smart-cam simulation project I have installed web2py and Apache on a Raspberry Pi, the idea here is to simulate the ARM platform on which the smart-cam web UI software will eventually run by using the Pi until the real hardware is sorted out and available. This will allow me to do some proof-of-concept software development sooner rather than later.

 

I was expecting a difficult enough install but it turned out to be very easy, I just executed the automated set-up script that is documented here, under the section called ‘One step production deployment’ (ubuntu).

 

To summarise the steps, with the Pi connected to the network, open a terminal window and execute the following:

 

[code]
wget http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh
chmod +x setup-web2py-ubuntu.sh
sudo ./setup-web2py-ubuntu.sh
[/code]

 

Running setup-web2py-ubuntu.sh took a good while (15 mins?), but when it was complete I was immediately able to view the web2py welcome page from another computer on the network!