• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 470
  • Last Modified:

Simple .htaccess using NIS

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?

1 Solution
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.
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.

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now