Ubuntu 22.04 LTSにパスワードの自動生成ツールPwgenをインストールする

環境

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"

Pwgenのインストール手順
1.インストール可能ツールpwgenバージョンの確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo apt info pwgen
Package: pwgen
Version: 2.08-2build1
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Theodore Y. Ts'o <tytso@mit.edu>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 53.2 kB
Depends: libc6 (>= 2.14)
Homepage: https://github.com/tytso/pwgen
Task: lubuntu-desktop
Download-Size: 17.4 kB
APT-Sources: http://jp.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
Description: パスワードを自動生成
pwgen は、ランダムで意味の無い代わりに発音可能なパスワードを 生成します。これらのパスワードには、小文字だけを含むパスワード、
小文字と大文字を両方含むパスワード、さらに、数字も含むパスワードを 生成するように設定できます。
大文字と数字は、単語だけを覚える場合に単語の位置を覚えやすい ように配置されます。
# sudo apt info pwgen Package: pwgen Version: 2.08-2build1 Priority: optional Section: universe/admin Origin: Ubuntu Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Original-Maintainer: Theodore Y. Ts'o <tytso@mit.edu> Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 53.2 kB Depends: libc6 (>= 2.14) Homepage: https://github.com/tytso/pwgen Task: lubuntu-desktop Download-Size: 17.4 kB APT-Sources: http://jp.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages Description: パスワードを自動生成 pwgen は、ランダムで意味の無い代わりに発音可能なパスワードを 生成します。これらのパスワードには、小文字だけを含むパスワード、 小文字と大文字を両方含むパスワード、さらに、数字も含むパスワードを 生成するように設定できます。 大文字と数字は、単語だけを覚える場合に単語の位置を覚えやすい ように配置されます。
# sudo apt info pwgen
Package: pwgen
Version: 2.08-2build1
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Theodore Y. Ts'o <tytso@mit.edu>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 53.2 kB
Depends: libc6 (>= 2.14)
Homepage: https://github.com/tytso/pwgen
Task: lubuntu-desktop
Download-Size: 17.4 kB
APT-Sources: http://jp.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
Description: パスワードを自動生成
 pwgen は、ランダムで意味の無い代わりに発音可能なパスワードを 生成します。これらのパスワードには、小文字だけを含むパスワード、
 小文字と大文字を両方含むパスワード、さらに、数字も含むパスワードを 生成するように設定できます。
 大文字と数字は、単語だけを覚える場合に単語の位置を覚えやすい ように配置されます。

2.Pwgenのインストールを行います

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo apt install -y pwgen
# sudo apt install -y pwgen
# sudo apt install -y pwgen

3.Pwgenコマンドのヘルプを確認します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# pwgen -h
Usage: pwgen [ OPTIONS ] [ pw_length ] [ num_pw ]
Options supported by pwgen:
-c or --capitalize
Include at least one capital letter in the password
-A or --no-capitalize
Don't include capital letters in the password
-n or --numerals
Include at least one number in the password
-0 or --no-numerals
Don't include numbers in the password
-y or --symbols
Include at least one special symbol in the password
-r <chars> or --remove-chars=<chars>
Remove characters from the set of characters to generate passwords
-s or --secure
Generate completely random passwords
-B or --ambiguous
Don't include ambiguous characters in the password
-h or --help
Print a help message
-H or --sha1=path/to/file[#seed]
Use sha1 hash of given file as a (not so) random generator
-C
Print the generated passwords in columns
-1
Don't print the generated passwords in columns
-v or --no-vowels
Do not use any vowels so as to avoid accidental nasty words
# pwgen -h Usage: pwgen [ OPTIONS ] [ pw_length ] [ num_pw ] Options supported by pwgen: -c or --capitalize Include at least one capital letter in the password -A or --no-capitalize Don't include capital letters in the password -n or --numerals Include at least one number in the password -0 or --no-numerals Don't include numbers in the password -y or --symbols Include at least one special symbol in the password -r <chars> or --remove-chars=<chars> Remove characters from the set of characters to generate passwords -s or --secure Generate completely random passwords -B or --ambiguous Don't include ambiguous characters in the password -h or --help Print a help message -H or --sha1=path/to/file[#seed] Use sha1 hash of given file as a (not so) random generator -C Print the generated passwords in columns -1 Don't print the generated passwords in columns -v or --no-vowels Do not use any vowels so as to avoid accidental nasty words
# pwgen -h
Usage: pwgen [ OPTIONS ] [ pw_length ] [ num_pw ]

Options supported by pwgen:
  -c or --capitalize
        Include at least one capital letter in the password
  -A or --no-capitalize
        Don't include capital letters in the password
  -n or --numerals
        Include at least one number in the password
  -0 or --no-numerals
        Don't include numbers in the password
  -y or --symbols
        Include at least one special symbol in the password
  -r <chars> or --remove-chars=<chars>
        Remove characters from the set of characters to generate passwords
  -s or --secure
        Generate completely random passwords
  -B or --ambiguous
        Don't include ambiguous characters in the password
  -h or --help
        Print a help message
  -H or --sha1=path/to/file[#seed]
        Use sha1 hash of given file as a (not so) random generator
  -C
        Print the generated passwords in columns
  -1
        Don't print the generated passwords in columns
  -v or --no-vowels
        Do not use any vowels so as to avoid accidental nasty words

4.8文字、4個のパスワードを自動で生成します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# pwgen 8 4
Aezei7oh aizi7ieN Oom5iiFo Aiy1ieQu
# pwgen 8 4 Aezei7oh aizi7ieN Oom5iiFo Aiy1ieQu
# pwgen 8 4
Aezei7oh aizi7ieN Oom5iiFo Aiy1ieQu

 

Ubuntu 22.04

Posted by arkgame