.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "CIPUX_STORAGE_CLIENT 1p" .TH CIPUX_STORAGE_CLIENT 1p "2015-07-23" "perl v5.20.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" cipux_storage_client \- Command line interface to CipUX storage abstraction layer .SH "VERSION" .IX Header "VERSION" version 3.4.0.2 .SH "USAGE" .IX Header "USAGE" .Vb 10 \& (1) cipux_storage_client \-h \& (2) cipux_storage_client [OPT] \-t get_value \-s \-o \-y [\-y ] \& (3) cipux_storage_client [OPT] \-t get_all_values \-s \-y [\-y ] \& (4) cipux_storage_client [OPT] \-t set_value [\-r] \-s \-o \-y \-v \& cipux_storage_client [OPT] \-t set_value \-a \-s \-o \-y \-v \& cipux_storage_client [OPT] \-t set_value [\-r] \-s \-o \-y [\-y ] \& cipux_storage_client [OPT] \-t set_value \-a \-s \-o \-y [\-y ] \& cipux_storage_client [OPT] \-t set_value \-d \-s \-o \-y [\-y ] \& cipux_storage_client [OPT] \-t set_value \-e \-s \-o \-y \& (5) cipux_storage_client [OPT] \-t set_all_values [\-r] \-s \-y \-v \& cipux_storage_client [OPT] \-t set_all_values \-a \-s \-y \-v \& cipux_storage_client [OPT] \-t set_all_values [\-r] \-s \-y [\-y ] \& cipux_storage_client [OPT] \-t set_all_values \-a \-s \-y [\-y ] \& cipux_storage_client [OPT] \-t set_all_values \-d \-s \-y [\-y ] \& (6) cipux_storage_client [OPT] \-t add_node \-s \-o \-x [\-x ] \& (7) cipux_storage_client [OPT] \-t delete_node \-s \-o \& (8) cipux_storage_client [OPT] \-t rename_node \-s \-o \-v \& abbreviations: OBJ = OBJECT, ATTR = ATTRIBUTE, VAL = VALUE, OPT = OPTIONS .Ve .SH "OPTIONS" .IX Header "OPTIONS" .Vb 1 \& Options for all commands: \& \& \-c | \-\-cfg : cipux\-storage\-access.conf \& \-D | \-\-debug [] : print debug messages for developers \& \-h | \-\-help : print help (this message + options) \& \-p | \-\-pretty : nice boxed output \& \-V | \-\-version : print only version \& \-\-verbose : print more messages \& \& Options for some commands: \& \& \-a | \-\-add : rather add then replace a value \& \-d | \-\-del : delete the value of the attribute \& \-e | \-\-erase : delete the attribute \& \-l | \-\-list : lists configuration scopes, can be used for \-\-type \& \-o | \-\-object : LDAP object leaf \& \-r | \-\-replace : replace a value, default behaviour \& \-s | \-\-storage_type : configuration type \& \-t | \-\-storage_task : action to perform \& \-v | \-\-value : value to be set \& \-x | \-\-mattrvalue : multiple LDAP attributes, please see description \& \-y | \-\-attrvalue : LDAP attribute, please see description .Ve .SH "REQUIRED ARGUMENTS" .IX Header "REQUIRED ARGUMENTS" cipux_storage_client .PP .Vb 1 \& \-t or \-h .Ve .PP cipux_storage_client \-t get_value .PP .Vb 3 \& \-s \& \-o \& \-y .Ve .PP cipux_storage_client \-t get_all_values .PP .Vb 2 \& \-s \& \-y .Ve .PP cipux_storage_client \-t set_value .PP .Vb 3 \& \-s \& \-o \& \-y .Ve .PP cipux_storage_client \-t set_all_values .PP .Vb 3 \& \-s \& \-y \& \-v .Ve .PP cipux_storage_client \-t add_node .PP .Vb 3 \& \-s \& \-o \& \-x .Ve .PP cipux_storage_client \-t delete_node .PP .Vb 2 \& \-s \& \-o .Ve .PP cipux_storage_client \-t rename_node .PP .Vb 3 \& \-s \& \-o \& \-v .Ve .SH "DESCRIPTION OF OPTIONS" .IX Header "DESCRIPTION OF OPTIONS" .IP "\fI\-a\fR" 4 .IX Item "-a" Same as option \-\-add. .IP "\fI\-\-add\fR" 4 .IX Item "--add" This adds a value where possible rather then replace a value. .IP "\fI\-\-attrvalue\fR" 4 .IX Item "--attrvalue" This can be used to specify the attribute by .Sp .Vb 1 \& \-\-attrvalue .Ve .Sp Or it can be used to specify the attribute and the value .Sp .Vb 1 \& \-\-attrvalue = .Ve .Sp Of course it can also be use together with \-\-value option to specify the attribute and the value like this: .Sp .Vb 1 \& \-\-attrvalue \-\-value .Ve .IP "\fI\-D\fR" 4 .IX Item "-D" Same as option \-\-debug. .IP "\fI\-d\fR" 4 .IX Item "-d" Same as option \-\-del. .IP "\fI\-\-del\fR" 4 .IX Item "--del" This deletes the attribute from the object where possible. .IP "\fI\-e\fR" 4 .IX Item "-e" Same as option \-\-erase .IP "\fI\-\-erase\fR" 4 .IX Item "--erase" Deletes the \s-1LDAP\s0 attribute of a given object. This will delete also all content of this attribute. If the an object has multible values for that attribute all values will be removed. If this is option is set, it will trigger \-\-delete command line option automatically. .IP "\fI\-h\fR" 4 .IX Item "-h" Same as option \-\-help .IP "\fI\-\-help\fR" 4 .IX Item "--help" Prints brief help message. .IP "\fI\-\-mattrvalue\fR" 4 .IX Item "--mattrvalue" This is option have to be use if a \s-1LDAP\s0 object has to be created. Unlike \&\-\-attrvalue this option requires always an attribute and a value. Therefore only this syntax is possible: .Sp .Vb 1 \& \-\-mattrvalue = .Ve .Sp The reason for this is to be able to gave the user exact hints when he try to create a object but forget the value. .Sp The 'm' stands for multiple. So it is possible to give the option several times. .IP "\fI\-o\fR" 4 .IX Item "-o" Same as option \-\-object .IP "\fI\-\-object\fR" 4 .IX Item "--object" This option is used to specify the object on which the command is operating. Make sure you choose the right object. Of course this will also fail when the object is not fetchable with (in the objects list of) \-\-storage_type. .IP "\fI\-p\fR" 4 .IX Item "-p" Same as option \-\-pretty. .IP "\fI\-\-pretty\fR" 4 .IX Item "--pretty" On command which produce an output, this option can be used to draw a fancy box around the output. .IP "\fI\-r\fR" 4 .IX Item "-r" Same as option \-\-replace. .IP "\fI\-\-replace\fR" 4 .IX Item "--replace" For some command this is the default option. It replace the value of a given attribute with a new value. .IP "\fI\-s\fR" 4 .IX Item "-s" Same as option \-\-storage_type. .IP "\fI\-\-storage_task\fR" 4 .IX Item "--storage_task" Name fo the action that can be performed. Valid actions are: .Sp .Vb 8 \& get_all_values \& set_all_values \& add_node \& get_value \& set_value \& list \& delete_node \& rename_node .Ve .IP "\fI\-\-storage_type\fR" 4 .IX Item "--storage_type" This option defines the 'type of the object' the command is operating with. A \&'type of object' is a certain set of objects with common attributes. For example all \s-1POSIX\s0 account objects. You can easily define new types of objects in the configuration file. The default location of this file is /etc/cipux/cipux\-storage\-structure.conf. .IP "\fI\-t\fR" 4 .IX Item "-t" Same as \-\-storage_task. .IP "\fI\-V\fR" 4 .IX Item "-V" Same as option \-\-version. .IP "\fI\-\-version\fR" 4 .IX Item "--version" Prints the version and exits. .IP "\fI\-\-verbose\fR" 4 .IX Item "--verbose" Not implemented jet. .IP "\fI\-l\fR" 4 .IX Item "-l" Same as option \-\-list .IP "\fI\-\-list\fR" 4 .IX Item "--list" Lists all object scopes. The object scopes are red from the configuration file. The default location of the configuration file is /usr/share/cipux/etc/cipux\-storage.perl. One object type is needed for the \&\-\-storage_type option. .IP "\fI\-v\fR" 4 .IX Item "-v" Same as option \-\-verbose. .IP "\fI\-\-value\fR" 4 .IX Item "--value" On some commands this is use to provide a value for an object or an attribute. .IP "\fI\-x\fR" 4 .IX Item "-x" Same as option \-\-mattrvalue. .IP "\fI\-y\fR" 4 .IX Item "-y" Same as option \-\-attrvalue. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is the command line client for CipUX::Storage. It can be used to get modify or delete CipUX storage objects. .SH "COMMANDS" .IX Header "COMMANDS" .Vb 7 \& cipux_storage_client \-t get_value \& cipux_storage_client \-t set_value \& cipux_storage_client \-t get_all_values \& cipux_storage_client \-t set_all_values \& cipux_storage_client \-t add_node \& cipux_storage_client \-t rename_node \& cipux_storage_client \-t delete_node .Ve .SS "cipux_storage_client \-t get_value" .IX Subsection "cipux_storage_client -t get_value" Retrieve one or more \s-1LDAP\s0 values for every given attribute of a given object. .SS "cipux_storage_client \-t get_all_values" .IX Subsection "cipux_storage_client -t get_all_values" Retrieve one or more \s-1LDAP\s0 values for every given attribute of all objects in a given object type. .SS "cipux_storage_client \-t set_value" .IX Subsection "cipux_storage_client -t set_value" (1) You can add values with cipux_storage_client \-t set_value. .PP .Vb 1 \& cipux_storage_client \-t set_value \-s all_group_node \-e memberUid \-o testgroup \-v login \-a .Ve .PP But this make only a difference for \s-1LDAP\s0 attributes which can be there more then one time. .PP .Vb 2 \& cipux_storage_client \-t set_value \-s all_group_node \-e memberUid \-o testgroup \-v login1 \-a \& cipux_storage_client \-t set_value \-s all_group_node \-e memberUid \-o testgroup \-v login2 \-a .Ve .PP This will result: .PP .Vb 2 \& memberUid: login1 \& memberUid: login2 .Ve .PP Where as the following lines have a different result: .PP .Vb 1 \& cipux_storage_client \-t set_value \-s all_group_node \-e groupType \-o testgruppe \-v public \-a .Ve .PP The resulting exception: .PP .Vb 1 \& attribute \*(AqgroupType\*(Aq cannot have multiple values at ./cipux_storage_client \-t set_value line 369 .Ve .PP In this case you have to remove the \-a option from your line or use \-r. .PP (2) The default behavior is to replace values. Values can be replaces with: .PP .Vb 1 \& cipux_storage_client \-t set_value \-s all_group_node \-e groupType \-o testgruppe \-v private .Ve .PP or .PP .Vb 1 \& cipux_storage_client \-t set_value \-s all_group_node \-e groupType \-o testgruppe \-v private \-r .Ve .PP This will replace the existing value with the new one. .PP But be aware (!), if you have 3 members in a group, for example: .PP .Vb 3 \& memberUid: login1 \& memberUid: login2 \& memberUid: login3 .Ve .PP after command the command: .PP .Vb 1 \& cipux_storage_client \-t set_value \-s all_group_node \-e memberUid \-o testgroup \-v login4 .Ve .PP you will have only one member! .PP .Vb 1 \& memberUid: login4 .Ve .PP Therefor the default behavior is to replace all but one value. The replace and not the add is the default behavior, because it there are more single attributes in \s-1LDAP\s0 and therefor the probability of failure will be less if replace is the default behavior. .PP (3) Also \s-1LDAP\s0 attributes can be deleted. If you have 2 memberUid's for example the delete operation will led to an exception: .PP .Vb 1 \& modify/delete: memberUid: no such value at ./cipux_storage_client \-t set_value line 369 .Ve .PP So to delete all (!) member you have to do two \s-1LDAP\s0 operations: .PP .Vb 2 \& cipux_storage_client \-t set_value \-s all_group_node \-e memberUid \-o testgroup \-v login \-r \& cipux_storage_client \-t set_value \-s all_group_node \-e memberUid \-o testgroup \-v login \-d .Ve .PP Where as the value from \-v is not important. .SS "cipux_storage_client \-t set_all_values" .IX Subsection "cipux_storage_client -t set_all_values" Set all \s-1LDAP\s0 values of a given object and attribute. .SS "cipux_storage_client \-t add_node" .IX Subsection "cipux_storage_client -t add_node" Adds an \s-1LDAP\s0 node. .PP \fI\s-1SYNOPIS\s0\fR .IX Subsection "SYNOPIS" .PP .Vb 1 \& cipux_storage_client \-t add_node \-s \-o \-x = [\-x = ...] .Ve .PP \fIUsage example\fR .IX Subsection "Usage example" .PP .Vb 1 \& cipux_storage_client \-t add_node \-s cipux_room \-o test1 \-x objectClass=room \-x objectClass=cipuxRoom \-x cn=test1 .Ve .PP If you do not provide cn=NAME for example, you will get the following exception: .PP .Vb 3 \& EXCEPTION mandatory attr [cn] is missing! \& Please provide \-x or \-\-mattrvalue command line option! \& Example: \-x cn= .Ve .PP To add a user node (not a complete user account!) this will create a half user account named testuser: .PP .Vb 1 \& cipux_storage_client \-t add_node \-s cipux_account.user \-o testuser \-x cipuxFirstname=test \-x cipuxLastname=user \-x objectClass=cipuxAccount \-x objectClass=posixAccount \-x objectClass=shadowAccount \-x uid=testuser \-x cn=testuser \-x cipuxCreationDate=2007\-10\-26 \-x uidNumber=20000 \-x gidNumber=20000 \-x homeDirectory=/home/testuser \-x objectClass=imapUser \-x mailMessageStore=/tmp \-D 129 .Ve .PP Of course this is just an example. It is not a good idea to give /tmp as mail storage directory or use a static uidNumber. But this or a similar command can be user to test the \s-1LDAP\s0 layer. .SS "cipux_storage_client \-t rename_node" .IX Subsection "cipux_storage_client -t rename_node" The rename command sets upon the Net::LDAP command modrdn. And due to the fact that simply rename a \s-1LDAP\s0 dn is not hole task of renaming an \s-1LDAP\s0 leaf the command can rename only certain \s-1LDAP\s0 objects. .PP It can for example rename a cipuxConfiguration \s-1LDAP\s0 leaf. Before renaming it looks basically like this: .PP .Vb 5 \& dn: cn=testconfig,ou=Configuration,ou=CipUX,dc=nodomain \& cipuxVariable: testvalue \& cn: testconfig \& objectClass: top \& objectClass: cipuxConfiguration .Ve .PP If you now issue the command: .PP .Vb 1 \& cipux_storage_client \-t rename_node \-s cipux_configuration \-o testconfig \-v myconfig .Ve .PP You will get .PP .Vb 6 \& dn: cn=myconfig,ou=Configuration,ou=CipUX,dc=nodomain \& cipuxVariable: testvalue \& cn: testconfig \& cn: myconfig \& objectClass: top \& objectClass: cipuxConfiguration .Ve .PP You noticed the 'cn' has doubled, since \s-1LDAP\s0 expect a corresponding 'cn' in this \s-1LDAP\s0 object? There for this configuration has now two names. It should be difficult to crate now a new 'testconfig'. You have to delete 'cn: testconfig' attribute and value before you can create a new 'testconfig'. Because this is rather confusing, you should avoid renaming where possible. Deleting an object and recreate it is a safer way. .SS "cipux_storage_client \-t delete_node" .IX Subsection "cipux_storage_client -t delete_node" Deletes a given \s-1LDAP\s0 node. .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" \&\s-1TODO\s0 .SH "EXIT STATUS" .IX Header "EXIT STATUS" \&\s-1TODO\s0 .SH "CONFIGURATION" .IX Header "CONFIGURATION" .Vb 1 \& /usr/share/cipux/etc/cipux_storage.perl .Ve .SH "DEPENDENCIES" .IX Header "DEPENDENCIES" CipUX::Storage::Client .SH "INCOMPATIBILITIES" .IX Header "INCOMPATIBILITIES" Not known. .SH "BUGS AND LIMITATIONS" .IX Header "BUGS AND LIMITATIONS" Not known. .SH "SEE ALSO" .IX Header "SEE ALSO" See the CipUX webpage and the manual at .PP See the mailing list .SH "AUTHOR" .IX Header "AUTHOR" Christian Kuelker .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright (C) 2008 \- 2009 by Christian Kuelker .PP This program is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but \&\s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE. \s0 See the \s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, \s-1MA 02111\-1307 USA\s0