ldaprenameuser command not found

In this troubleshooting guide we learn how to fix ldaprenameuser command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

ldaprenameuser: command not found

or when using sudo you get the following error message

sudo: ldaprenameuser: command not found

Solutions to ldaprenameuser: command not found

How To Fix ldaprenameuser: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu ldaprenameuser is provided by ldapscripts package.

ldapscripts is:

Ldapscripts are shell scripts that allow management of POSIX accounts (users, groups, machines) in a LDAP directory. They are similar to smbldap-tools but are written in shellscript, not Perl.

They only require OpenLDAP client commands (ldapadd, ldapdelete, ldapsearch, ldapmodify, ldappasswd) and make administrator’s work a lot easier avoiding the need to configure Perl and each library dependency (e.g. Net::LDAP).

These scripts are very simple to configure by not requiring any Samba-related information (SID, profiles, homes, etc): management of Samba attributes is entirely done by standard commands (net, smbpasswd and pdbedit) used together with the scripts. Moreover, most of the configuration is guessed from the one of nslcd, and everything should work out from the box for most users.

The scripts may be used independently - within command lines - or automatically by Samba (like smbldap-tools), to handle POSIX information within accounts before adding Samba information.

To fix this problem, we can install more using the command below.

sudo apt-get -y install ldapscripts

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install ldapscripts.

sudo apt -y install ldapscripts

Or if you have aptitude installed you can use the following command.

sudo aptitude install ldapscripts

Summary

In this tutorial we learn how to fix ldaprenameuser command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.