Chinaunix首页 | 论坛 | 博客
  • 博客访问: 101905143
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-05-03 13:50:06

你的密码够安全吗?

虽然现在使用生日、名字之类的当作密码的人越来越少了,但是如果你的密码是英文单词之类,还是可以通过跑字典破解,而且,现在很多人都有这么一个习惯,就是不管邮箱、IM、论坛帐号什么的,使用的密码都是那么一两个,这样万一一个泄露,全部的帐号都会遭殃……

可以帮你生成不容易被破解的“强码”,而且还可以根据你的需求包含符号和大小写,省得你绞尽脑汁去想~

pwgen 的可用参数:

localhost ~ # pwgen --help
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/

什么?太难记了?那是,好记的话还叫随机密码吗……

其实,你完全可以把密码抄在纸上,或者干脆重定向到个文件中去,有表明,把密码写在纸上,可以有效防止在不同的地方都使用相同的密码,因此会更安全,只要你妥善保存好就可以,毕竟这比较简单,而且密码多数情况是为了网络上和你相距很远的不速之客。

pwgen 的主页:

阅读(309) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~