While setting up the Samba Server on CentOS 7, I met with this message on termial that is ” -bash: smbpasswd: command not found “. The smbpasswd is mainly use for setting the password for user in samba server.

How to get smbpasswd commad on system

To get smbpasswd commad on system ,use the below given command.

yum install samba-client

The smbpasswd command will be available now after installing samba-client package as described in above section.

To know why I only select samba-client. Read our this post.

In short, before deciding to use samba-client package. We run the yum command with provides argument. Which helps us to find smbpasswd command is available in samba-client package.

See the below reference taken from our server.

[root@localhost ~]# yum provides smbpasswd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.nbrc.ac.in
 * extras: mirror.nbrc.ac.in
 * updates: centosh2.centos.org
samba-client-4.1.1-31.el7.x86_64 : Samba client programs
Repo        : base
Matched from:
Filename    : /usr/bin/smbpasswd



samba-client-4.1.1-33.el7_0.x86_64 : Samba client programs
Repo        : updates
Matched from:
Filename    : /usr/bin/smbpasswd



samba-client-4.1.1-35.el7_0.x86_64 : Samba client programs
Repo        : updates
Matched from:
Filename    : /usr/bin/smbpasswd



samba-client-4.1.1-37.el7_0.x86_64 : Samba client programs
Repo        : updates
Matched from:
Filename    : /usr/bin/smbpasswd

[root@localhost ~]# 

Recommended Further Reading : About smbpasswd

Read Some More Articles

2 Comments

  1. Now it is 2021, and the packaging has evidently changed since this article was published. On RHEL7 / CentOS 7, the /usr/bin/smbpasswd is now delivered by the smb-common-tools package.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.