Installing pwgen

Print Friendly, PDF & Email

There’s a small but useful package in Fedora called “pwgen”; it generates random passwords.  I’ve used it to generate random passwords for MySQL accounts, for example.

(My reasoning is that those passwords often end up in PHP scripts and such, and so might be viewable by another student.  If I allowed students to choose their own passwords, they might reuse a password they are familiar with, one they use for another account.  That wouldn’t be secure.  Furthermore, if we use a .my.cnf file, there’s no reason anyone should ever have to type a MySQL password, so we might as well make it super-hard to crack.)

However, I’ve had to ssh to Sampras (still running Fedora…) to get these passwords.  I couldn’t imagine that pwgen wasn’t available for CentOS/RHEL.  Nevertheless:

[root@tempest ~] yum search pwgen
Warning: No matches found for: pwgen
No Matches found

That can’t be right, I said.  Googling for “pwgen centos” found http://pkgs.org/centos-6-rhel-6/epel-i386/pwgen-2.06-5.el6.i686.rpm.html which says it’s available in EPEL.  D’oh!

[root@tempest ~] yum repolist all
repo id                       repo name                                                          status
10gen                         10gen Repository                                                   enabled:     6
epel                          Extra Packages for Enterprise Linux 6 - x86_64                     disabled
epel-debuginfo                Extra Packages for Enterprise Linux 6 - x86_64 - Debug             disabled
epel-source                   Extra Packages for Enterprise Linux 6 - x86_64 - Source            disabled
epel-testing                  Extra Packages for Enterprise Linux 6 - Testing - x86_64           disabled
epel-testing-debuginfo        Extra Packages for Enterprise Linux 6 - Testing - x86_64 - Debug   disabled
epel-testing-source           Extra Packages for Enterprise Linux 6 - Testing - x86_64 - Source  disabled
rhel-source                   Red Hat Enterprise Linux 6Server - x86_64 - Source                 disabled
rhel-source-beta              Red Hat Enterprise Linux 6Server Beta - x86_64 - Source            disabled
rhel-x86_64-server-6          Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64)           enabled: 8,896
rhel-x86_64-server-optional-6 RHEL Server Optional (v. 6 64-bit x86_64)                          enabled: 5,475
rpmforge                      RHEL 6Server - RPMforge.net - dag                                  disabled
rpmforge-extras               RHEL 6Server - RPMforge.net - extras                               disabled
rpmforge-testing              RHEL 6Server - RPMforge.net - testing                              disabled
repolist: 14,377
[root@tempest ~] yum --enablerepo=epel search pwgen
============================================= N/S Matched: pwgen ==============================================
pwgen.x86_64 : Automatic password generation

  Name and summary matches only, use "search all" for everything.
[root@tempest ~] yum --enablerepo=epel -y install pwgen
....
Installed:
  pwgen.x86_64 0:2.06-5.el6                                                                                    

Complete!
[root@tempest ~] 

About CS SysAdmins

The CS Department System Administrators
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

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