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