Simple .htaccess using NIS

Posted on 2006-04-27
Last Modified: 2008-03-03
I have an Apache web server running on Redhat FC4.  I'd like to create a simple .htaccess file or modify the conf file to enable authentication for the entire site but I want it to use our NIS servers.  In the end I don't want to have to add users to a htpasswd file or anything.  If I create a user on my NIS domain I want the Apache server to recognize that and allow the user to login.

Can someone help me with this?

Question by:wanabi
    LVL 2

    Expert Comment

    Well, I`ve waited for some time to see if anyone knows better. As far as I know, it`s just not possible.
    Yet you can write a login CGI script instead.
    LVL 10

    Accepted Solution

    There are some perl modules that will do this, such as Apache::AuthenNIS and Apache::AuthNISPlus

    There is the possibility of using mod_auth_pam with NIS, but there is a good chance you will run into port privelege problems (web servers usually run unprivileged, while NIS server may only accept certain requests from privileged ports, i.e. <1024).  I'm not sure whether the perl modules suffer from the same problem or whether they include some sort of suid workaround.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
    It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now