Can apache use /etc/passwd (or /etc/shadow) as a password file?

Discussion in 'Apache' started by liquidsam, May 31, 2006.

  1. #1
    Linux: Suse 10
    Apache: 2.0.58

    I'm trying to use username/password combos from unix as valid username/password combos inside of Apache. Suse uses a shadow file for passwords located at /etc/shadow, so inside my httpd.conf I put:

    AuthType Basic
    AuthName "Restricted Files"
    AuthUserFile /etc/shadow

    I've gotten Apache to accept username/password combos from a password file created by htpasswd as the Apache docs tell you to do, but I really need every user on the system to have access. Anyone know how to do this or if it's even possible?

    -Sam
     
    liquidsam, May 31, 2006 IP
  2. forkqueue

    forkqueue Guest

    Messages:
    401
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Apache can't read /etc/shadow, and making it able to do so would be a massive security problem.

    If you're using Linux then the best way to achieve the same result is via the use of mod_auth_pam.
     
    forkqueue, Jun 1, 2006 IP