NAME

cipux_add - Version 3.2.11-1 2006-04-05 CipUX


SYNOPSIS

        cipux_add [OPTIONS]
        Options: (one nessessary)
        (01)  -u            :adds a user node, needs -w or -W
        (02)  -c            :adds a course node
        (03)  -m            :adds a machine node
        (04)  -r            :adds a room node
        (05)  -t            :adds a hardware type node
        (06)  -i            :adds a image node
        (07)  -s            :adds a image slot node
        (08)  -y            :adds a admin node
        (09)  -x            :adds a configuration node
        Other options:
        (10)  -w <password> :password for a new node
                            (only if -u -c or -m option was given)
        (11)  -W            :read password from STDIN or promt                      
                            (only if -u -c or -m option was given)
        (12)  -h            :get help message
        Attribute options:
             like:
             --attribute option=value
             example:
             --attribute cipuxFirstname=Christian
        See cipux_add -h for more attribute options!
        Return values:
        If succsess, returns login
        If error, returns LDAP and CipUX error message


ABSTRACT

This script adds nodes to the CipUX system: Nodes may be LDAP user parts (e.g. posix user), LDAP group parts (e.g. posix group) and and other kind of nodes.

To fullfill this task, it adds the node to the CipUX LDAP Server and may on behalf execute some shell scripts.

This possible CipUX nodes (LDAP entry) this script can add to the LDAP server are:

  User (-u),
  Course (-c),
  Machine (-m),
  Room (-r),
  Hardware Type (-t),
  Image (-i),
  Image Slot (-s),
  Admin (-y) or
  Configuration (-x)

It uses the ldapmodify programm and *.tpl files to perform the task.


REQUIREMENTS

       CipUX::CiBot
       CipUX::Conversion
       cipux_list
       cipux_setup
       user.tpl
       course.tpl
       machine.tpl
       room.tpl
       hardware_type.tl
       configuration.tpl
       image.tpl
       image_slot.tpl
       admin.tpl
       ldapmodify
       Tie::IxHash
       Getopts::Long

environment

uses Getopt::Long to define additional LDAP attributes as a commandline option.

It also defines the long options as the following:

  my %attribute = ();
  GetOptions("attribute=s" => \%attribute);

When used with command line options:

  --attribute uid=testinus --attribute homeDrive='/home/testinus'

this will generate the hash:

  $attribute{uid}='testinus';
  $attribute{homeDrive}='/home/testinus';


FUNCTIONS

usage

Prints usage message.


SEE ALSO

See the CipUX webpage and the manual at http://www.cipux.org See the mailing list http://www.cipux.org/mailman/listinfo/


AUTHOR

Christian Kuelker <christian.kuelker@cipworx.org>


COPYRIGHT AND LICENSE

Copyright (C) 1999-2006 by Christian Kuelker

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, 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