ldapsetprimarygroup: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On Debian possible default full paths are:

/usr/sbin/ldapsetprimarygroup - from package: ldapscripts

You may install the required package with command apt-get install {package}
Error in other languages:
ldapsetprimarygroup: bevel nie gevind nie
ldapsetprimarygroup: comandă negăsită
ldapsetprimarygroup: comando não encontrado
ldapsetprimarygroup: commande introuvable
ldapsetprimarygroup: command not found
ldapsetprimarygroup: käsku ei ole
ldapsetprimarygroup: không tìm thấy lệnh
ldapsetprimarygroup: komanda nerasta
ldapsetprimarygroup: Kommando nicht gefunden.
ldapsetprimarygroup: kommandot finns inte
ldapsetprimarygroup: komut yok
ldapsetprimarygroup: nie znaleziono polecenia
ldapsetprimarygroup: níor aimsíodh an t-ordú
ldapsetprimarygroup: no se encontró la orden
ldapsetprimarygroup: no s'ha trobat l'ordre
ldapsetprimarygroup: opdracht niet gevonden
ldapsetprimarygroup: parancs nem található
ldapsetprimarygroup: perintah tidak ditemukan
ldapsetprimarygroup: príkaz nenájdený
ldapsetprimarygroup: příkaz nenalezen
ldapsetprimarygroup: команда не найдена
ldapsetprimarygroup: командата не е открита
ldapsetprimarygroup: 命令找不到
ldapsetprimarygroup: コマンドが見つかりません