NAME

cipux_get_value - Version 3.2.11-1 2002-08-16 CipUX


SYNOPSIS

        cipux_get_value [OPTIONS] -e <ENTRY>
        Options: (exact only one is mandatory)
        (01) -u <UCN>  :get user value
        (02) -c <CCN>  :get course value
        (03) -m <MCN>  :get machine value
        (04) -r <RCN>  :get room value
        (05) -t <TCN>  :get hardware type value
        (06) -i <ICN>  :get image value
        (07) -s <SCN>  :get image slot value
        (08) -y <YCN>  :get admin value
        (09) -x <XCN>  :get configuration values
        (10) -U        :get value for all users
        (11) -C        :get value for all courses
        (12) -M        :get value for all machines
        (13) -R        :get value for all rooms
        (14) -T        :get value for all hardware types
        (15) -I        :get value for all images
        (16) -S        :get value for all image slots
        (17) -Y        :get value for all admins
        (18) -X        :get value for all configuration
        Auxilliary options:
        (19) -h        :get help page
        (20) -v        :get value for cipuxVariable
        UCN = U+CN = U=user + CN = canonical name
        CCN, MCN, RCN analog


ABSTRACT

This script querries a LDAP server for a given entry (attribute). It can be done in two modes (A) all nodes and (B) one node to be returned. Four fields can be querried: (1) user (2) course (3) machine and (4) room.

The output of mode (A) will be a TAB seperated list: 'CN TAB ENTRY\n'. The output of (B) a plain list or single entry.

This Version was made by www.cipworx.org for Debian-edu.


REQUIREMENTS

        CipUX:CiBot
        Getopt::Std
        Ldap_Search_Command


EXAMPLES

The command

  cipux_get_value -u cipadmin -e cipuxRole

will return: ``account''. Whereas

  cipux_get_value -c cipadmin -e cipuxRole

will return: ``admin''. And the line

 cipux_get_value -x cipux -e cipuxVariable -v Cipux_Default_Group_Hard_Quota

will return:

 0

if the attribute ``cipuxVarible: Cipux_Default_Group_Hard_Quota=0'' is set in LDAP. But aware, there could be more than one return value, if the ``cipuxVariable: Cipux_Default_Group_Hard_Quota=...'' is more then once in that ldap node ``cipux''. This could be the case, if somebody add that value via some LDAP browser.

Whereas

 ./cipux_get_value -U -e uid

will retrun (for example):

 chkuelker
 geprade
 maklappenbach
 maherweg

as a list of all users of the system. But you should use cipux_task_list_users for this, because it may not be the attribute uid on all systems and cipux_get_value will not respect the cipuxRole, whereas cipux_task_list_users should.

        # Its possible to get more than 1 value for 1 node:
        #     value1\n
        #     value2\n
        #     ....
        # Its possible to get more than 1 value for every nodes:
        #     node1 \t value1 \t value2 \t value3 \t value4 ...\n
        #     node2 \t value1 \t value2 \t value3 \t value4 ...\n
        #     ...

Output formats

 value TAB value
 value TAB values
  value


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/

cipux_set_value


AUTHOR

Christian Kuelker <christian.kuelker@cipworx.org>


COPYRIGHT AND LICENSE

Copyright (C) 1999-2005 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