linux 下密码生成器,linux下密码生成器pwgen

1) 工具说明

Linux下的密码生成工具.

2) 下载安装

安装:

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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值