This file is indexed.

/usr/sbin/db2index is in 389-ds-base 1.3.3.5-4.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash

source /usr/share/dirsrv/data/DSSharedLib

libpath_add "/usr/lib/x86_64-linux-gnu/dirsrv/"
libpath_add ""
libpath_add "/usr/lib/x86_64-linux-gnu"
libpath_add "/usr/lib/x86_64-linux-gnu"

export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH

usage ()
{
    echo "Usage: db2index [-Z serverID] [-n backend | {-s includesuffix}* -t attribute[:indextypes[:matchingrules]]"
    echo "                -T vlvTag] [-h]"
    echo "Options:"
    echo "        -Z serverID       - Server instance identifier"
    echo "        -n backend        - Backend database name.  Example: userRoot"
    echo "        -s includeSuffix  - The suffix to index"
    echo "        -t attribute[:indextypes[:matchingrules]]"
    echo "                          - attributeName: name of the attribute to be indexed";
    echo "                            If omitted, all the indexes defined for that instance are generated."
    echo "                          - indextypes: comma separated index types"
    echo "                          - matchingrules: comma separated matrules"
    echo "                                 Example: -t foo:eq,pres"
    echo "        -T vlvTag         - VLV index name"
    echo "        -h                - Display usage" 
}

while getopts "hZ:n:s:t:T:vd:a:SD:x:" flag
do
    case $flag in
        h) usage
           exit 0;;
        Z) servid=$OPTARG;; 
        n) args=$args" -n $OPTARG"
           benameopt="set";;
        s) args=$args" -s $OPTARG"
           includeSuffix="set";;
        t) args=$args" -t $OPTARG";;
        T) args=$args=" -T $OPTARG";;
        d) args=$args=" -d $OPTARG";;
        a) args=$args=" -a $OPTARG";;
        x) args=$args=" -x $OPTARG";;
        v) args=$args=" -v";;
        S) args=$args=" -S";;
        D) args=$args" -D $OPTARG";;
        ?) usage
           exit 1;;
    esac
done

if [ -z $benameopt ] && [ -z $includeSuffix ]
then
    usage
    exit 1;
fi

initfile=$(get_init_file "/etc/default" $servid)
if [ $? == 1 ]
then
    usage
    echo "You must supply a valid server instance identifier.  Use -Z to specify instance name"
    echo "Available instances: $initfile"
    exit 1
fi

servid=`normalize_server_id $initfile`
. $initfile

if [ $# -eq 0 ]
then
    bak_dir=/var/lib/dirsrv/slapd-$servid/bak/reindex_`date +%Y_%m_%d_%H_%M_%S`
    /usr/sbin/ns-slapd upgradedb -D $CONFIG_DIR -a "$bak_dir"
elif [ $# -lt 2 ]
then
    usage
    exit 1
else
    /usr/sbin/ns-slapd db2index -D $CONFIG_DIR $args
fi