Home directory for Active Directory authenticated users based on parsed username

Posted on

Home directory for Active Directory authenticated users based on parsed username – Problems with loading a website are often blamed on the Internet connection, but even the most perfectly set up network cannot help if there is no service to reply at your destination. One of the most popular HTTP servers used for this task is Apache2. Much of Apache’s popularity can be attributed to its easy installation and use, but never the less it is possible to run into problems with even the easiest of the software. If you’ve encountered an issue loading your web page, follow these simple troubleshooting methods outlined in this guide to attempt to get your web server back up and working again. Below are some tips in manage your apache2 server when you find problem about apache-2.2, active-directory, sssd, , .

I have an NFS share with user home directories mounted on a web server. I want to enable UserDir in apache, but the home directories are not a straight-forward “/home/username” path. Instead, they’re organized into a hierarchy based on their username. For example, a username may be ab1234 (always two letters followed by four numbers). The hierarchy for that home folder would be /ab/ab12/ab1234.

In the sssd.conf I know that there are basic parameters for parsing the username out of the username@domain string, but is there anything that can parse that username further into parts?

I believe I found a workaround that doesn’t involve the “UserDir” directive. I’ve used a mod-rewrite rule to in the VirtualHost directive parse the URL after the server name path and rewrite the URL accordingly:

        RewriteEngine On
        RewriteRule ^/([a-z]{2})([0-9]{2})([0-9]{2}) /$1/$1$2/$1$2$3/www [L,PT]

Leave a Reply

Your email address will not be published.