Need help setting up User Auth w/ apache

Discussion in 'Linux Networking' started by ed west, Feb 24, 2004.

  1. ed west

    ed west Guest

    Hello,

    I am having some trouble getting user authentication on apache
    working. I am using apache 2.0.40 on RedHat 9, kernel version
    2.4.20-20.9. I made a password file .htpasswd with htpasswd, chown
    apache.apache, made sure the directory it is in is world readable, and
    made the changes to httpd.conf (and restarted apache).

    <Directory /www/somedir/bla/hblah/blah/phpMyAdmin>
    AuthType Basic
    AuthName "phpMyAdmin"
    AuthUserFile /www/somedir/.htpasswd
    require valid-user
    </Directory>

    I get the following error - any suggestions? Do I have to do
    something with Limit? Thanks!!

    401 Authorization Required
    Authorization Required

    This server could not verify that you are authorized to access the
    document requested. Either you supplied the wrong credentials (e.g.,
    bad password), or your browser doesn't understand how to supply the
    credentials required.

    Additionally, a 404 Not Found error was encountered while trying to
    use an ErrorDocument to handle the request.
     
    ed west, Feb 24, 2004
    #1
    1. Advertisements

  2. Does .htpasswd have 644 permission (or at least 604)? Is the dir 755?
    You mention read permission (which allows dir listing), but dir needs 'x'
    permission to access it. Apparently there is also a problem with your
    ErrorDocument. What do your server logs say?
    No you do not need Limit to password protect all access to that path
     
    David Efflandt, Feb 25, 2004
    #2
    1. Advertisements

  3. ed west

    ANdre H Guest

    This is an exemple,but look at AuthType, AuthUserFile AuthGrouFile !!
    in a <Directory ... >
    AuthName "Please enter your userID and password"
    AuthType Basic
    AuthUserFile /usr/apache/my/passwd
    AuthGroupFile /usr//apachel/my/group

    <Limit GET POST PUT>
    require group AHuser
    </Limit>
    </Directory>
     
    ANdre H, Feb 25, 2004
    #3
  4. google wrote on 02/24/2004 12:51 ET
    Some Server is only accept encrypted password. You ente
    http://tools.dynamicdrive.com/password
    to encrypt your password. After copy into .htpasswd
    Wish you success
     
    robocon20062007, Jan 29, 2013
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.