现在的位置: 首页 > 综合 > 正文

linux下密码生成器pwgen

2012年04月07日 综合 ⁄ 共 1340字 ⁄ 字号 评论 1 条

下载: wget http://fossies.org/unix/privat/pwgen-2.06.tar.gz

安装:

# mkdir -p /orahome/wangnc/pwgen

# cd /orahome/wangnc/pwgen

# rz (上传安装包pwgen-2.06.tar.gz)

# tar zxvf pwgen-2.06.tar.gz && cd pwgen-2.06

# ./configure && make && make install

...

mkdir -p /usr/local/bin /usr/local/man/man1

/usr/bin/install -c pwgen /usr/local/bin/pwgen

/usr/bin/install -c -m 644 ./pwgen.1 /usr/local/man/man1/pwgen.1

3) 使用示例

# which pwgen

/usr/local/bin/pwgen

# pwgen (默认生成一堆8位的密码)

eiju6Ahk EiGh8jee EethaN0e Wah9the0 uNova8Ai WaaRooX0 ooc3DeiC pah0Quai
v

# 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
-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

假如你要生成 3 个 10 位的密码,只要 pwgen 10 3 即可:
localhost ~ # pwgen 10 3
oajie9ZaiM tieshi3bah hphae8aech

-s 参数可以生成完全的随机密码,-y 参数可以让你的密码包含 =, ,% 这些符号~
localhost ~ # pwgen -sy 10 3
_\T;6ngPs4 9&5-p3w}|X YLaV^=Q!x/

目前有 1 条留言    访客:1 条, 博主:0 条

  1. Eula Rodriguez 2012年04月10日 上午 5:58  @回复  Δ1楼 回复

    awesome new blog but have you considered about actually getting serious about your site’s SEO? If so look into the WordPress plugin SEOPressor. It’s a webmaster’s dream come true. You can install it here:

给我留言

留言无头像?