If you installed samba from git, by default it goes in /usr/local/samba/.../...

Here is a way to configure is so you can use samba commands from anywhere..

Just edit your /etc/environment file :

sudo nano /etc/environement
now add :/usr/local/samba/bin:/usr/local/samba/sbin before the ending quote

Save and close.

Now you can use your samba commands from anywhere at the prompt without having to type /usr/local/samba/.../.../