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:
[crayon]
apachectl -k stop
[/crayon]
cd to the web2py directory and run web2py.py specifying a new password (greater than 4 characters long?) like this:
[crayon]
sudo python web2py.py -a the_new_passsword
[/crayon]
Then kill the web2py, e.g. via ctrl-c, and then copy parameters_8000.py to parameters_443.py, like this:
[crayon]
sudo cp parameters_8000.py parameters_443.py
[/crayon]
Restart the apache server:
[crayon]
sudo apachectl -k restart
[/crayon]
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! ;-)