Welcome to Aaron Thompson's Page Tuesday, September 02 2014 @ 17:00 CDT  
Personal
Contact Info
Family
Resume
 
Development
CGI
probability project
 
Perl Modules
Win32::AD::User (cpan)
 
Shell
backup_file (source)
chkconfig (source)
gen-autohome (source)
group-utils (source)
mail-deny (source)
mail-logs (source | archive)
mailman-qmail (source)
qmail vacation (source)
 
Links
Beast of Burden LLC
Central Iowa LUG
CedarLUG
CedarvalleyPM
ITS-IS Home
ITS Home
UNI Home
 
 

Name

generate-autohome.pl -- autohome file generator.

Synopsis
  generate-autohome.pl [ > autohome_file]
Description

generate-autohome.pl provides a simple command-line tool for manipulating LDAP group information to create a home-directory automount file for autofs. Autofs is the kernel automounter (almost complete SunOS style automounter) under Linux (kernels 2.0.31 and higher).

The generate-autohome.pl was created to do away with the tedious task of creating autohome files on the many (many many) linux server and workstations in our college.

generate-autohome.pl relies on the OpenLDAP utilities to get the group information, as well as cron to run the autohomeupdate.sh. The autohomeupdate.sh is used to backup and update the /etc/auto.home file.

Options

generate-autohome.pl does not accept any command line options. It reads information from an LDAP server, interprets the data and then dumps a autofs file to standard out. This output then should be redirected into an autofs config file. We use /etc/auto.home as a standard in CNS

Configuration

  $includeFile
    This is the location of the include file. The default value for this is
    "/usr/local/etc/generate-autohome.include". Each line in the file should be
    a username followed by a space then the full DNS name for a server. An
    example of this would be: 
        ->thompson math-cs.cns.uni.edu<-

  $excludeFile
    This is the location of the exclude file. The default value for this is
    "/usr/local/etc/generate-autohome.exclude". Each line in the file should be
    a username to exclude. An example of this would be:
         ->thompson<-
    The exclude file has a higher priority than the include file. If a user is
    in both files that person will be left out.
            
  $DefaultMount
    The DefaultMount is the default string used for mounting a home directory.
    Autofs only allows one wild card in the config file, and because of this it
    is usualy at the of the file. 
 
  $ldapsearchParams
    The ldapsearchParams refers to the paramiters (or options) to send to the
    ldapsearch command. We use " -x -P2 " for our current setup.
 
  $ldapsearchArgs
    The ldapsearchArgs refers to any addtional arguments that should be sent
    after the paramiters. These arguments can be used to limit the search
    results.

  $ldapsearch
    ldapsearch refers to the location of the ldapsearch binary. By default this
    is "/usr/bin/ldapsearch".

Report a Bug

If you find a bug please let me know email me at thompson@cns.uni.edu.

Download / Source

Copyright (C) 2003 Aaron Thompson
thompson@cns.uni.edu

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. or visit http://www.gnu.org/copyleft/gpl.html

Click here to view the source code online

Click here to download the script