fusiondirectory-shell

Install

apt-get install fusiondirectory-webservice-shell

Howto use

Connect with fusiondirectory-shell

fusiondirectory-shell -u <URL>/fusiondirectory/jsonrpc.php -l <LOGIN> -p <PASSWORD>

or

fusiondirectory-shell -u <URL>/jsonrpc.php -l <LOGIN> -p <PASSWORD>

if you have made a virualhost

Replace <URL>, <LOGIN> and <PASSWORD> by the values to connect to your FusionDirectory installation.

Type help to see the command list.

help
              addtab -- Activate a tab (or several) of an object
            addvalue -- Add a value to a multivaluated field of an object
                 cat -- Show an object information
                  cd -- Change current base to BASE
               count -- Count objects of a given type
              create -- Create an object of a given type, optionaly with the given tabs
              delete -- Delete an object of a given type
            delvalue -- Remove a value from a multivaluated field of an object
                exit -- Exit FusionDirectory shell
                help -- Print helpful information
               infos -- Show informations about a type
                  ls -- List objects of a given type
              lstabs -- List an object activated tabs
                 pwd -- Print the current working directory
           removetab -- Deactivate a tab of an object
            setvalue -- Set the value of a field of an object
               types -- List existing types

Others examples

addtab

fd-admin@dc=labo,dc=opensides,dc=be> addtab USER uid=fd-admin,ou=people,dc=labo,dc=opensides,dc=be posixAccount
[Group membership]
[Account]
[System trust]
[Unix]
Home directory: /home/test
Shell:
0:/bin/tcsh (/bin/tcsh)
1:/bin/csh (/bin/csh)
2:/bin/sh (/bin/sh)
3:/bin/ksh (/bin/ksh)
4:/bin/ash (/bin/ash)
5:/bin/zsh (/bin/zsh)
6:/bin/false (/bin/false)
7:/bin/bash (/bin/bash)
8:/bin/dash (/bin/dash)
9:/sbin/nologin (/sbin/nologin)
Choice: 3

addvalue

fd-admin@ou=people,dc=labo,dc=opensides,dc=be> addvalue USER uid=fd-admin title monTitre

cat

fd-admin@dc=local,dc=lan> cat user uid=fd-admin,ou=people,dc=local,dc=lan
[Plugin]
        sn:                    Administrator
        givenName:             System
        uid:                   fd-admin
        personalTitle:
        academicTitle:
        homePostalAddress:
        homePhone:
        labeledURI:
        ou:
        o:
        dateOfBirth:
        gender:                0
        preferredLanguage:     0
        departmentNumber:
        description:
        employeeNumber:
        employeeType:
        l:
        st:
        jpegPhoto:             *removed*
        roomNumber:
        telephoneNumber:
        mobile:
        pager:
        cn:                    System Administrator
        street:
        postalCode:
        postalAddress:
        facsimileTelephoneNumber:
        gosaLoginRestriction:  $VAR1 = [];
        manager:

cd

fd-admin@dc=local,dc=lan> cd ou=department
fd-admin@ou=department,dc=local,dc=lan>

count

fd-admin@dc=local,dc=lan> count aclrole
3

create

fd-admin@dc=labo,dc=opensides,dc=be> create USER
[Organizational contact information]
[Account information]
Login: newuser
Password method:
0:crypt/enhanced-des (crypt/enhanced-des)
1:clear (clear)
2:crypt/blowfish (crypt/blowfish)
3:crypt/standard-des (crypt/standard-des)
4:md5 (md5)
5:crypt/md5 (crypt/md5)
6:crypt/sha-512 (crypt/sha-512)
7:crypt/sha-256 (crypt/sha-256)
8:ssha (ssha)
9:smd5 (smd5)
10:sha (sha)
Choice: 8
Password: test
Password again: test
[Personal information]
Last name: lastname
First name: firstname
[Personal contact information]
[Organizational information]
uid=newuser,ou=people,dc=labo,dc=opensides,dc=be

delete

fd-admin@dc=labo,dc=opensides,dc=be> delete USER uid=newuser,ou=people

delvalue

fd-admin@dc=labo,dc=opensides,dc=be> delvalue USER uid=fd-admin,ou=people,dc=labo,dc=opensides,dc=be user title
	Title[title]:                 
	                               monTitre
0:monTitre
Value(s) to remove (space separated): 0

infos

fd-admin@dc=local,dc=lan> infos aclrole
icon:                  plugins/acl/images/role.png
aclCategory:           acl
mainAttr:              cn
mainTab:               aclRole
name:                  ACL role
filter:                (objectClass=gosaRole)
tabs:
        Role    (aclRole)
management:            aclRoleManagement
ou:                    ou=aclroles,
nameAttr:              cn

ls

fd-admin@dc=local,dc=lan> ls group
fd-admin        (cn=fd-admin,ou=groups,dc=local,dc=lan)

pwd

fd-admin@dc=local,dc=lan> pwd
dc=local,dc=lan

removetab

fd-admin@dc=labo,dc=opensides,dc=be> removetab user uid=fd-admin,ou=people posixAccount

setvalue

fd-admin@dc=labo,dc=opensides,dc=be> setvalue USER uid=fd-admin,ou=people user displayName mydisplayname

types

fd-admin@dc=local,dc=lan> types
Domain                         DOMAIN
User                           USER
Department                     DEPARTMENT
FusionDirectory configuration  CONFIGURATION
Object group                   OGROUP
Locality                       LOCALITY
ACL role                       ACLROLE
Dashboard                      DASHBOARD
Group                          GROUP
ACL assignment                 ACLASSIGNMENT
Domain Component               DCOBJECT
Role                           ROLE
Organization                   ORGANIZATION
Country                        COUNTRY
special                        SPECIAL
en/documentation/plugin/webservice_plugin/how_to_use_shell.txt · Last modified: 2017/10/31 10:32 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0