View Full Version : Adding users to PhpMyAdmin

12-19-2003, 09:05 PM
I was wondering how I could add users to beable to login to PhpMyAdmin and use it.
Thanks for the help.

12-19-2003, 09:14 PM
phpMyAdmin uses a .htaccess file to authen users that is pointed to a .htpasswd file. You can find the path to that file in the .htaccess file. You would need to add the user and password to that .htpasswd file.

If you want to restrict how they can use phpMyAdmin you can check the documentation on it at http://www.phpmyadmin.net/home_page/docs.php

I think the docs are also in the phpMyAdmin directory.

12-19-2003, 09:23 PM
Ok, but the password is encrypted, any clue on how to encrypt the password?

never mind, i googled it

12-19-2003, 09:35 PM
Cool let us know if you have any other problems! There are tons of programs out there you can use to encrypt the password. You also have one that does it in your SiteManager at least for password protecting a directory. You can get clues from it.

12-20-2003, 09:23 AM
Use the htpasswd program to create a .htpasswd file. If you use the correct options, it will encrypt the password for you. For options, log into a westhost server and just type htpasswd. For some reason, it doesn't seem to have a man page. Here is how I would do it. Change the that directory and run.

htpasswd -cm .htpasswd torrin

change torrin with whatever user name you want to use. Then to add more username . . .

htpasswd -m .htpasswd wildjoker

change wildjoker with whatever user name you want to use.

12-20-2003, 10:45 AM
So the first creates the .htpasswd file and the second code would add a user to an existing .htpasswd file of the directory you are in right? Would all the users be using the same password or do you specify a different password for each using this method?

12-20-2003, 12:14 PM
That's correct. The "-c" options makes it create the file specified. It will also overwrite a file that is already there, so use it with caution.

Also, each one of those commands will ask for a password, so each user will have a different one, unless you specify the same. Give it a try.

Here is the man page from apache 1.3 . . .