sharesec: 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 CentOS possible default full paths are:

/usr/bin/sharesec - from package: samba4-client
/usr/bin/sharesec - from package: samba-client

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/sharesec - from package: samba

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