smbpasswd command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
smbpasswd: command not found
or when using sudo you get the following error message
sudo: smbpasswd: command not found
Solutions to smbpasswd: command not found
How To Fix smbpasswd: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu smbpasswd is provided by samba-common-bin package.
samba-common-bin is:
Samba is an implementation of the SMB/CIFS protocol for Unix systems, providing support for cross-platform file sharing with Microsoft Windows, OS X, and other Unix systems. Samba can also function as a domain controller or member server in both NT4-style and Active Directory domains.
This package contains the common files that are used by both the server (provided in the samba package) and the client (provided in the samba-clients package).
To fix this problem, we can install more using the command below.
sudo apt-get -y install samba-common-bin
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install samba-common-bin.
sudo apt -y install samba-common-bin
Or if you have aptitude installed you can use the following command.
sudo aptitude install samba-common-bin
Summary
In this tutorial we learn how to fix smbpasswd command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.