This file is indexed.

/usr/sbin/dbverify is in 389-ds-base 1.3.7.10-1ubuntu1.

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
#!/bin/bash

. /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
PATH=$PATH:/bin

usage()
{
    echo "Usage: dbverify [-Z serverID] [-n backend_instance] [-a db_directory ] [-V] [-v] [-d debuglevel] [-h]"
    echo "Note if \"-n backend\" is not passed, verify all DBs."
    echo "Options:"
    echo "        -Z              - Server instance identifier"
    echo "        -n backend      - Backend database name.  Example: userRoot"
    echo "        -a db_directory - Database directory"
    echo "        -V              - Verbose output"
    echo "        -d debuglevel   - Debugging level"
    echo "        -v              - Display version"
    echo "        -h              - Display usage"
}

display_version="no"
while getopts "Z:n:hVvfd:n:D:a:" flag
do
    case $flag in
        h) usage
           exit 0;;
        Z) servid=$OPTARG;;
        n) args=$args" -n \"$OPTARG\"";;
        d) args=$args" -d \"$OPTARG\"";;
        V) args=$args" -V";;
        v) args=$args" -v"
           display_version="yes";;
        f) args=$args" -f";;
        D) args=$args" -D \"$OPTARG\"";;
        a) args=$args" -a \"$OPTARG\"";;
        ?) usage
           exit 1;;
    esac
done


shift $(($OPTIND - 1))
if [ $1 ]
then
    echo "ERROR - Unknown option: $1"
    usage
    exit 1
fi

initfile=$(get_init_file "/etc/default" $servid)
if [ $? -eq 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

. $initfile

eval /usr/sbin/ns-slapd dbverify -D $CONFIG_DIR $args
if [ $display_version = "yes" ]; then
    exit 0
fi
if [ $? -eq 0 ]; then
    echo "DB verify: Passed"
    exit 0
else
    echo "DB verify: Failed"
    exit 1
fi