centOS7 安装密码生成器

本文介绍了在CentOS7系统中如何安装和使用密码生成器,特别是针对pwgen的安装过程。在尝试使用yum安装makepasswd失败后,通过升级yum源和安装epel-release解决报错问题,最终成功安装并使用了pwgen。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Linux下三种便捷的密码生成器

pwgen

makepasswd

passwdmaker

 

注:目前仅尝试了pwgen和makepasswd,但是目前仅pwgen成功。

=================================================================

以下是安装过程

 

yum安装,报错

sudo yum install makepasswd

 

[root@iZ2zeczh9tfpmxmijw5qppZ java]# yum install makepasswd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyuncs.com
 * epel: mirrors.aliyuncs.com
 * extras: mirrors.aliyuncs.com
 * updates: mirrors.aliyuncs.com
No package makepasswd available.
Error: Nothing to do
[root@iZ2zeczh9tfpmxmijw5qppZ java]# 


经查询之后进行yum的扩展和更新:

 

yum  install epel-release  //扩展包更新包

 

yum  update //更新yum


yum repolist //确定更新结果正常

[root@iZ2zeczh9tfpmxmijw5qppZ java]# 
[root@iZ2zeczh9tfpmxmijw5qppZ java]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyuncs.com
 * epel: mirrors.aliyuncs.com
 * extras: mirrors.aliyuncs.com
 * updates: mirrors.aliyuncs.com
repo id                                                                              repo name                                                                                                           status
base/7/x86_64                                                                        CentOS-7 - Base                                                                                                      9,363
epel/x86_64                                                                          Extra Packages for Enterprise Linux 7 - x86_64                                                                      11,808
extras/7/x86_64                                                                      CentOS-7 - Extras                                                                                                      381
updates/7/x86_64                                                                     CentOS-7 - Updates                                                                                                   1,859
repolist: 23,411
[root@iZ2zeczh9tfpmxmijw5qppZ java]# 


但是安装makepasswd时依旧报错,

 

[root@iZ2zeczh9tfpmxmijw5qppZ java]# yum install makepasswd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyuncs.com
 * epel: mirrors.aliyuncs.com
 * extras: mirrors.aliyuncs.com
 * updates: mirrors.aliyuncs.com
No package makepasswd available.
Error: Nothing to do
[root@iZ2zeczh9tfpmxmijw5qppZ java]#

 

转而进行安装pwgen

yum installpwgen

结果正常

 

[root@iZ2zeczh9tfpmxmijw5qppZ java]# yum install pwgen
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyuncs.com
 * epel: mirrors.aliyuncs.com
 * extras: mirrors.aliyuncs.com
 * updates: mirrors.aliyuncs.com
Resolving Dependencies
--> Running transaction check
---> Package pwgen.x86_64 0:2.07-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================
 Package                                         Arch                                             Version                                                 Repository                                      Size
===============================================================================================================================================================================================================
Installing:
 pwgen                                           x86_64                                           2.07-1.el7                                              epel                                            24 k

Transaction Summary
===============================================================================================================================================================================================================
Install  1 Package

Total download size: 24 k
Installed size: 37 k
Is this ok [y/d/N]: Y
Downloading packages:
pwgen-2.07-1.el7.x86_64.rpm                                                                                                                                                             |  24 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : pwgen-2.07-1.el7.x86_64                                                                                                                                                                     1/1 
  Verifying  : pwgen-2.07-1.el7.x86_64                                                                                                                                                                     1/1 

Installed:
  pwgen.x86_64 0:2.07-1.el7                                                                                                                                                                                    

Complete!
[root@iZ2zeczh9tfpmxmijw5qppZ java]# pwgen 10 1
XohFephoo3 
[root@iZ2zeczh9tfpmxmijw5qppZ java]# pwgen 10 2
Xie3eefoom tae6Jee2Ei 

 


 

 

 

 

 

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值