Forum Moderators: phranque
Here's my file:
AuthUserFile /etc/passwd
AuthType Basic
AuthName "/usr/local/apache2/htdocs/phpMyAdmin"
require user_name_here
I was thinking it was a problem with mod_access or mod_auth not being loaded, but when I tried to load the m in httpd.conf, I get errors:
module access_module is built-in and can't be loaded
module auth_module is built-in and can't be loaded
Also, I'm running Apache 2.0.54.
Any help is greatly appreciated. Thanks.
-spd.
If you do need to use that user/pass data, then create a new password file which has :
username:password
To automatically convert the /etc/passwd file :
awk -F ":" '{print $1 ":" $2}' /etc/shadow > newfile
the newfile will have the content you need. You'll need to do this as root as other users shouldn't be able to
read /etc/shadow
Note that this may not work is passwords are MD5 encrypted in /etc/shadow. Should work fine if they are DES encrypted.
Also, doing this probably isn't a good idea to begin with, if you have to do it anyway, you may want to edit the newfile to remove user root and others you don't need/want in there.
-spd.
<Directory "my_directory">
Options Indexes Includes FollowSymLinks
AllowOverride None
AuthName "Login"
AuthType Basic
AuthUserFile /my/password/file
require valid-user
</Directory>
I had you use your suggestion above to convert the passwd file for it to work right.
I restarted apache and it works great. Thanks for the help!
-spd.