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 :
now add :/usr/local/samba/bin:/usr/local/samba/sbin before the ending quoteCode:sudo nano /etc/environement
Save and close.
Now you can use your samba commands from anywhere at the prompt without having to type /usr/local/samba/.../.../