Are There Any Sample LDIF To ADD Or REMOVE Fields On a LOGONID?

Document ID : KB000054962
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Are there any samples to add, change and remove a field on a LOGONID by issuing an ldapmodify command with an LDIF?

Solution:

Generally, there are two patterns of how the field on LOGONID is specified

  • field with value or
  • field with no value.

Please see the following examples: Assume that we use an ldapmodify command like this:

          ldapmodify -D acf2lid=admuser,host=xxxx,o=yyy,c=zz -w admpswd -x -h hostname -f 
          sample.ldif -v

(where sample.ldif is the name of the file which contains the LDIF statements below)

Sample LDIFs for a field with value

  • Add a PHONE number 0123456789 to logonid TSTUSER or Replace the current PHONE number with 0123456789:
        dn: acf2lid=TSTUSER,acf2admingrp=lids,host=xxxx,o=yyy,c=zz
        changetype:modify
        Phone:0123456789
    The equivalent command under CA ACF2 is:
        CHA TSTUSER PHONE(0123456789)

    Note: CA LDAP Server provides UFNs(User Friendly Names) for each field on the LOGONID in the CA ACF2 database.

    Example:
    Phone is the UFN for field PHONE in the CA ACF2 database. The list for UFNs can be found in the Chapter 3 ?CA ACF2_RA Backend? in CA LDAP Server for CA ACF2 Administrator Guide.

  • Remove the PHONE field from logonid TSTUSER:
        dn: acf2lid=TSTUSER,acf2admingrp=lids,host=xxxx,o=yyy,c=zz
        changetype:modify
        delete:Phone 
    The equivalent command under CA ACF2 is :
        CHA TSTUSER PHONE()

Sample LDIFs for a field with no value

  • Add TRACE attribute to logonid TSTUSER:
        dn: acf2lid=TSTUSER,acf2admingrp=lids,host=xxxx,o=yyy,c=zz
        changetype:modify
        TraceAllEvents:Y 
    The equivalent command under CA ACF2 is:
        CHA TSTUSER TRACE
  • Remove TRACE attribute from logonid TSTUSER:
        dn: acf2lid=TSTUSER,acf2admingrp=lids,host=xxxx,o=yyy,c=zz
        changetype:modify
        TraceAllEvents:N
    The equivalent command under CA ACF2 is:
        CHA TSTUSER NOTRACE