Allowing SuperAdmin access to Joomla for Demos

So you want to allow SuperAdmin access to joomla for demos, but you don’t want anybody to be able to do anything? Well, if thats what you want to do, then you will have to perform the following.

Do a base installation of Joomla for 1.5.23, 1.6.0 or 1.7.0 by unarchiving all files into your web root. ( ie unzip Joomla-Release.zip or untar -xvjf Joomla-Release.tar.bz or untar -xvzf Joomla-Release.tar.gz ) Once you have performed the zip install, create  a database for the joomla install.

CREATE DATABASE joomlademo

After you have created the database, create the user and set permissions for the install

CREATE USER joomlademo@localhost;
revoke all on *.* FROM joomlademo@localhost;
grant all on joomlademo.* to joomlademo@localhost;

Browse to your demosite and perform the regular installation adjusting the configuration.php as necessary at the appropriate times and also the .htaccess file.

For example: I touched the configuration.php and performed chown [apacheuser]:[apacheuser] that file after the first page to allow writing by the web server for that host. Then because I am using aliasing, I changed the rewrite base to RewriteBase /joomlademo.

After performing a successful installation, remove permissions from the configuration.php file: chown root:root configuration.php. I also removed the installation directory by performing rm -rf installation from within the webroot for that host.

Once these steps have been completed, you should be able to at least log in and view the admin panel. You can customize the views and install modules or whatever as long as you make sure to remove file permissions afterward. Example: chown -R root:root * from within webroot directory. Setting the appropriate permissions before and after module,component,plugin install is outside of the scope of this article.

To fix the mysql permissions to disallow any more updating or installing to the database tables we need to now perform the following:

revoke all on joomlademo.* FROM joomlademo@localhost;
grant select on joomlademo.* to joomlademo@localhost;
grant insert on joomlademo.jos_session to joomlademo@localhost;
grant update on joomlademo.jos_session to joomlademo@localhost;
use joomlademo;
update jos_users SET password='98733f69eb6334c97b66fd97e97a1ce3:3v0CgoRtapWBSh9VOL9scO7NNDdnv7xx' WHERE username='admin';
-- NOTE this will allow admin username to be changed to the word password
flush hosts;
flush tables;
flush privileges;

NOTE: to check that the correct permissions are being applied – you can check the mysql database db table: USE mysql; SELECT * FROM db; and also make sure to flush hosts; flush tables;flush privileges; after privilege changes;

Now you should have a joomla backend that you can log into and peruse but can’t make changes to.

Good luck!

ttessier

About ttessier

Professional Developer and Operator of SwhistleSoft
This entry was posted in Content Management Systems, Joomla Development and tagged , , , , , . Bookmark the permalink.

One Response to Allowing SuperAdmin access to Joomla for Demos

  1. Magnificent goods from you, man. I’ve take into account your stuff previous to and you are just too wonderful. I really like what you have received here, really like what you are saying and the best way in which you assert it. You are making it entertaining and you continue to take care of to keep it smart. I cant wait to learn far more from you. That is actually a terrific web site.

Leave a Reply to artiste peintre Cancel reply

Your email address will not be published. Required fields are marked *