Archive for July, 2007

This is just a note for future reference. At some point, I’m going to want to make some webpages visible only to users in our ldap database. This is an example .htaccess file to do this:

Order allow,deny
Allow from 192.168.23
AuthType Basic
AuthName "Site Access"
LDAP_Server ldapserver.uchicago.edu
UID_Attr uid
Base_DN "ou=people,dc=ldapserver,dc=uchicago,dc=edu"
require valid-user
satisfy any

or here’s another example I found

AuthType Basic
AuthName "Restricted Access"
                                                                                     
AuthLDAPURL ldap://ldapserver.uchicago.edu/ou=people,dc=ldapserver,dc=uchicago,dc=edu?uid?one
AuthLDAPCompareDNOnServer on

Order deny,allow
Deny from all
Allow from 127.0.0.1 10.10.10. 111.111.111.111
                                                                            
satisfy any

I’m not yet sure how to make sure the authentication goes over a secure connection, but I don’t think that will be too hard.

After thinking a long time about our setup, and playing around with Win2003 server, I figured out that I was making things harder on myself than they should be. My goal is to have a single ldap server that handles all of our user authentication. This ldap server will be running openldap on a redhat linux machine. I’ve already figured out how to set up ldap, that info is in other posts.

My current setup uses a win2000 server along with a linux machine to set up all the disks. I was thinking that I should get another win server to replace the one I currently use. But on this new one, I’d put a TB worth of disks. I’d then set up active directory to use the openldap server for authentication. The problem is, I couldn’t find any information on doing this. All the pages I found were for using the active directory machine as the ldap server. I’m not familiar enough with windows to be comforable with that setup. I don’t know what to back up, what files are important, etc. So, I’d rather have the ldap server on a linux machine where I can easily dump all the info in the database for a backup.

I also was not liking win2003 server at all. Like Vista, it seems to want to control access to many things and make it hard to turn this access control off. After becoming frustrated because I couldn’t surf to a website to download a driver, I decided to not use it, if possible.

I had the solution the entire time, but didn’t realize it. pGINA does exactly this. It lets me set the openldap server in linux and then mount windows disks without any problems. This is exactly what I want it to do. Now, I just have to mount the linux disks as well, but since this will authenticate against the ldap server which is running on the same machine, I don’t anticipate any problems.

The last step, where I do think I’ll have problems, is getting dovecot to work with the ldap server. In the past, I couldn’t get this to work. But I’m hoping now that I’ll be able to get it figured out.

We have a Dell 2407 widescreen monitor and an NVIDIA Quadro NVS 285 video card. I was not able to get the screen working at 1920×1200 resolution until I added a Modeline line to the monitor section of my xorg.conf file.

Here is the relevant part of xorg.conf to get this setup working properly.

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Dell 2407WFP (Digital)"
        DisplaySize  520        330
        HorizSync    30.0 - 83.0
        VertRefresh  56.0 - 76.0
        Option      "dpms"
        Modeline    "1920x1200" 154.128 1920 1968 2000 2080 1200 1203 1209 1235 +hsync -vsync

EndSection

Section "Device"
        Identifier  "Videocard0"
        Driver      "nv"
        VendorName  "Videocard vendor"
        BoardName   "NVIDIA Quadro NVS 285"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     16
                Modes    "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "1920x1200" "1280x960" 
        EndSubSection
EndSection

1. Make the partition with fdisk, be sure to set the partition type as Linux swap
2. Run mkswap /dev/
3. Edit /etc/fstab to automatically mount the swap partition

Can also use swapon to add it immediately.