safe-ldif command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
safe-ldif: command not found
or when using sudo you get the following error message
sudo: safe-ldif: command not found
Solutions to safe-ldif: command not found
How To Fix safe-ldif: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu safe-ldif is provided by ldap-git-backup package.
ldap-git-backup is:
ldap-git-backup (creates and) updates a Git repository which contains the current LDIF dump of an LDAP directory. Given that writes are rare in an LDAP directory and confined to a few entries for each write Git will store the entire history of an LDAP directory in a space efficient way.
By default the backups are done with slapcat from OpenLDAP but can be done with any command that dumps the current contents of an LDAP directory in LDIF format.
To fix this problem, we can install more using the command below.
sudo apt-get -y install ldap-git-backup
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install ldap-git-backup.
sudo apt -y install ldap-git-backup
Or if you have aptitude installed you can use the following command.
sudo aptitude install ldap-git-backup
Summary
In this tutorial we learn how to fix safe-ldif command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.