Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to require valid user/password?

Discussion in 'General Discussion' started by kosmo, Jun 24, 2002.

  1. kosmo

    kosmo Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    403
    Likes Received:
    0
    Trophy Points:
    316
    Location:
    All over Europe
    Any idea how can I require valid unix user/password when entering a web page? I don't want my own list, I need access to the stored local users and the shadowed passwords. And I can't use port 2082, I need port 80.

    Thanks in advance.

    kosmo
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. feanor

    feanor Well-Known Member

    Joined:
    Aug 13, 2001
    Messages:
    836
    Likes Received:
    0
    Trophy Points:
    316
    Naturally I posted this before I even realized what you were saying....... but if you want to always be in sync with local users, you can script something and cron it to look for a certain UID/GID within /etc/passwd and /etc/shadow, and then copy the necessary portions to the .htaccess/.htpasswd files in question.

    *There probably is a better way of doing this, somebody please enlighten us all* :p

    use .htaccess .......
    plenty of how-tos online.

    (using that functionality in the root of a site, aka their public_html dir, will require a login for the entire site)

    or you can do specific subdirs of course, etc, etc
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. snowgod

    snowgod Well-Known Member

    Joined:
    Sep 23, 2001
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    306
    Unfortunatly, there is no good, safe way to do this for a script run under apache. On a quick glance through Google, I found http://pam.sourceforge.net/mod_auth_pam/

    This may be a good option if you run apache with suexec.

    Other than that, you don't have many good options.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice