# [SOLVED] Openldap install missing slappasswd

## alan_m

Hello,

I'm trying to configure openldap following http://www.gentoo.org/doc/en/ldap-howto.xml but I'm stuck at the early stages at Code Listing 2.2: Generate password

```

w510 ~ # sudo su

w510 ~ # slappasswd

bash: slappasswd: command not found

w510 ~ # echo $PATH

/sbin:/bin:/usr/sbin:/usr/bin:/root/bin/:./

w510 ~ # emerge -pv openldap --quiet

[ebuild   R   ] net-nds/openldap-2.4.33-r1  USE="berkdb crypt ipv6 minimal overlays samba smbkrb5passwd ssl syslog tcpd -cxx -debug -experimental -gnutls -icu -iodbc -kerberos -odbc -perl -sasl (-selinux) -slp"

```

I'm sure I'm missing something obvious but google hasn't been very helpful

Thanks in advance for any help you can offerLast edited by alan_m on Sat Jan 19, 2013 4:26 pm; edited 1 time in total

----------

## BillWho

alan_m,

If you're going to use sudo then use sudo -i slappasswd  or you can just enter sudo -i then your password then slappasswd

For root user "su -" then the root password.

To locate slappasswd use whereis slappasswd or which slappasswd

----------

## alan_m

Hi BillWho,

I think I must still be missing something (either in my execution of the instructions, my understanding or my installation)

```

alan@w510 ~ $ sudo -i slappasswd

Password: 

-bash: slappasswd: command not found

```

```

w510 init.d # whereis slappasswd

slappasswd: /usr/share/man/man8/slappasswd.8.bz2

w510 init.d # which slappasswd

which: no slappasswd in (/sbin:/bin:/usr/sbin:/usr/bin:/root/bin/:./)

w510 init.d # whoami

root

```

Per the man page it should be in /usr/sbin/slappasswd

```

NAME

       slappasswd - OpenLDAP password utility

SYNOPSIS

       /usr/sbin/slappasswd   [-v]   [-u]   [-g|-s secret|-T file]   [-h hash]

       [-c salt-format] [-n] [-o option[=value]]

```

```

w510 sbin # sudo ls /usr/sbin/slappasswd

ls: cannot access /usr/sbin/slappasswd: No such file or directory

```

So it seems to be missing but I don't understand why as I emerge and re-emerged openldap as per the instructions (see previous post for use)

Kind Regards,

Alan

----------

## BillWho

alan_m,

I don't have OpenLDAP installed so I can't be too thorough with this, but try

```
equery f openldap|grep slappasswd 
```

It should show you where the file is located - I'm pretty sure slappasswd belongs to OpenLDAP   :Confused: 

----------

## alan_m

Hi BillWho,

Does equery operate against the local install or the repository ?

```

w510 alan # equery f openldap | grep slappasswd

/usr/share/man/man8/slappasswd.8.bz2

```

So it looks like only the man(ual) information is installed and not the executable (which matches my experience); so I guess the question is that a problem with my install or a problem with the repository / packaging.

Kind Regards,

Alan.

----------

## BillWho

alan_m,

That's very odd. I just got on a machine with it and:

```
gateway portage # equery f openldap | grep slappasswd

/usr/sbin/slappasswd

/usr/share/man/man8/slappasswd.8.bz2

gateway portage # whereis slappasswd

slappasswd: /usr/sbin/slappasswd /usr/share/man/man8/slappasswd.8.bz2

```

/usr/sbin/slappasswd is a symlink /usr/sbin/slappasswd -> ../lib64/openldap/slapd

Do you have /usr/lib/openldap/slapd or /usr/lib64/openldap/slapd   :Question: 

----------

## alan_m

I think I finally tracked it down to the 'minimal' use flag

After I set this to -minimal and fixed some blocked packages I now have a slappasswd executable.

Strange the man files are installed but not the executable.

Thanks BillWho for the pointers.

----------

