#author("2017-01-11T01:19:24+09:00","Group2","Group2") hidekiwiki


にほんブログ村 IT技術ブログ Linuxへ
にほんブログ村

mkpasswdをインストールするには

yum -y install expect

と実行します。RPMForgeを常時有効化していない場合は

yum -y --enablerepo=rpmforge install expect

と実行します。 これで、ランダムなパスワードを生成してくれるmkpasswdのインストールは完了です。

mkpasswdの使い方

mkpasswdコマンドの使い方は

mkpasswd -l 20

と実行すると20桁のランダムな文字列を生成します。

インストール時の表記例

[root@hoge ~]# yum -y install expect
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.tsukuba.wide.ad.jp
* extras: ftp.tsukuba.wide.ad.jp
* updates: ftp.tsukuba.wide.ad.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package expect.x86_64 0:5.44.1.15-2.el6 will be installed
--> Processing Dependency: libtcl8.5.so()(64bit) for package: expect-5.44.1.15- 2.el6.x86_64
--> Running transaction check
---> Package tcl.x86_64 1:8.5.7-6.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================== =============================================================================== ===================
Package                                 Arch                                    Version                                             Repository                             Size
=============================================================================== =============================================================================== ===================
Installing:
expect                                  x86_64                                  5.44.1.15-2.el6                                     base                                  256 k
Installing for dependencies:
tcl                                     x86_64                                  1:8.5.7-6.el6                                       base                                  1.9 M
Transaction Summary
=============================================================================== =============================================================================== ===================
Install       2 Package(s)
Total download size: 2.2 M
Installed size: 4.9 M
Downloading Packages:
(1/2): expect-5.44.1.15-2.el6.x86_64.rpm                                                                                                                  | 256 kB     00:00
(2/2): tcl-8.5.7-6.el6.x86_64.rpm                                                                                                                         | 1.9 MB     00:03
------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -------------------
Total                                                                                                                                            326 kB/s | 2.2 MB     00:06
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
 Installing : 1:tcl-8.5.7-6.el6.x86_64                                                                                                                                      1/2
 Installing : expect-5.44.1.15-2.el6.x86_64                                                                                                                                 2/2
Installed:
 expect.x86_64 0:5.44.1.15-2.el6
Dependency Installed:
 tcl.x86_64 1:8.5.7-6.el6
Complete!

トップ   編集 凍結解除 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2017-01-11 (水) 01:19:24 (334d)