This file is indexed.

/usr/sbin/perditiondb_ldap_makedb is in perdition-ldap 2.1-2build1.

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
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/bin/bash
######################################################################
# perditiondb_ldap_makedb                                     May 2000
# Horms                                             horms@verge.net.au
#
# Sample programme to make an LDAP based popmap
#
# perdition
# Mail retrieval proxy server
# Copyright (C) 1999-2005  Horms
# 
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
######################################################################


DEFAULT_DC="cn=admin,dc=nodomain"

if [ -z "$(type -path ldapadd)" ]; then
  echo "Could not find ldapadd command. Bailing" >&2
  exit 1
fi

cat << __EOF__

This script expects perdition.schema to be installed and included
in your slapd.conf file. Typically this is done by adding the
following line to /etc/ldap/slapd.conf after any other include
lines and before any database definitions

include         /etc/ldap/schema/perdition.schema

__EOF__

echo -n "Has perdition.schema been added to /etc/ldap/slapd.conf? [y/N]: "
read flim
if [ -z "$flim" -o "$flim" != "y" -a "$flim" != "Y" ]; then
  echo Bailing...
  exit 0
fi


cat << __EOF__

openldap requires a binddn to bind to the LDAP directory
The default is "$DEFAULT_DC". To use this
hit return, otherwise enter a host to connect to, it should be a
string-represented DN as defined in RFC 1779.
__EOF__

echo -n "Enter binddn [$DEFAULT_DC]: " >&2
read dc
if [ -z "$dc" ]; then
  dc="$DEFAULT_DC"
fi


cat << __EOF__

You will need to enter the password for the
binddn: "$dc".
The default may be "secret", you should change
your ldap configuration if this is the case.
__EOF__

echo -n "Enter the password for \"$dc\": " >&2
stty -echo
read rootpw
stty echo
echo

echo "Initialising LDAP popmap..."

ldapadd -x -D "$dc" -w "$rootpw" << __EOF__
dn: ou=mailbox, dc=nodomain
ou: mailbox
objectClass: top
objectClass: organizationalUnit
description: Popmap for perdition

dn: uid=horms, ou=mailbox,  dc=nodomain
objectClass: top
objectClass: uidObject
objectClass: perditionPopmap
uid: horms
username: horms
mailhost: localhost
port: 110
__EOF__

if [ $? != 0 ]; then
  echo "Error initialising LDAP popmap. Bailing" >&2
  exit 1
fi
cat << __EOF__
Done

You may add more entries of the form: 

dn: uid=horms, ou=mailbox, dc=nodomain
objectClass: top
objectClass: uidObject
objectClass: perditionPopmap
uid: horms
username: horms
mailhost: localhost
port: 110

__EOF__