If the package is not installed, run below commands (in this example, i use mkpasswd as an example):
If the package is installed:
$ yum whatprovides "*/mkpasswd"
OR
$ repoquery -q --file */mkpasswd
If the package is installed:
$ rpm -qf /usr/bin/mkpaswd