个人工具
登录
查看“UbuntuHelp:StrongPasswords”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:StrongPasswords”的源代码
来自Ubuntu中文
←
UbuntuHelp:StrongPasswords
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/StrongPasswords}} {{Languages|UbuntuHelp:StrongPasswords}} #title Strong Passwords === Introduction === Many security mechanisms present in Ubuntu and elsewhere require a password. Passwords are the most commonly used security tactic in computing, and are frequently used to protect sensitive information, such as your e-mail account, or your Ubuntu user account. Choosing a strong password for any application, or service which may require one is extremely important. If the password you choose is based on common information such as a dictionary word, an attacker may use a so-called "brute-force" method of determining your password, and subsequently compromise the account, or data protected with that password. This guide demonstrates the generation of strong passwords with applications available to Ubuntu. This guide ''does not'' recommend a formal password policy, including rotation/change scheduling, re-use prevention strategies, and the like. Such principles are beyond the scope of this guide, and the reader is requested to see the resources presented at the end of this guide for further information on passwords, and formal password policies. === Target Audience === This guide is for anyone with sufficient experience with the GNU/Linux command-line, including installing packages using <code><nowiki>apt-get</nowiki></code>, and executing command-line tools who also has an interest in passwords, and generating strong passwords with a command-line utility. === Strong Passwords === Applications, and libraries exist for your Ubuntu system to assist in generating, or enforcing strong passwords. A strong password is defined as any password which meets the following criteria: * At least ''eight'' (8) characters in length * Does not contain your user name, real name, or organization name * Does not contain a complete dictionary word * Is significantly different from your previous password * Should contain ''three'' (3) of the following character types ** Lowercase Alphabetical (a, b, c, etc.) ** Uppercase Alphabetical (A, B, C, etc.) ** Numerics (0, 1, 2, etc.) ** Special Characters (@, %, !, etc.) === Generating Strong Passwords in Ubuntu === Now that we've establish what constitutes a strong password. How do we have our computers help generate strong passwords automatically? This section will cover the ''Automatic Password Generator'' application (APG) which is available in Ubuntu via System Administration (universe). APG does precisely what its name implies: it ''automatically generates passwords''. Not only does APG generate passwords, it will generate ''strong passwords'' for you as well. If you wish to study APG further, you may find all information at the APG website. (see the '''Resources''' section of this guide) https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconTip.png ''It should be noted here that Ubuntu's password functions for user accounts do provide some means of enforcing strong passwords for user accounts, but there are cases, and applications where the strength of the password cannot be enforced in this manner, and so this guide exists to help the user generate acceptable strong passwords''. ==== Installing APG ==== To install APG, ensure you have enabled the Universe Packages, (see UniversePackages) and have a live connection to the Internet, then issue the following command at a command prompt: <code><nowiki> sudo apt-get install apg</nowiki></code> You will be prompted for a password. The password being requested is ''your user password'', or the same password you use when issuing commands with the <code><nowiki>sudo</nowiki></code> command. After authentication, the APG package will be downloaded, and installed. You are now ready to begin using, and further configuring APG to your liking. ==== Using APG ==== The default behavior of APG installed on Ubuntu via apt-get when executed, is to prompt for random data from standard input (typically the keyboard) and upon pressing enter, display ''six'' (6) strong "pronounceable" passwords. They are referred to as "pronounceable" because the passwords may actually be pronounced like regular words. In fact, APG includes the pronunciation in parentheses () to the right of each password. Additionally, they are ''strong passwords'' because they include a mix of lowercase, uppercase, and numeric characters. An example of executing <code><nowiki>apg</nowiki></code> and the default output of APG is presented here: <code><nowiki>apg</nowiki></code> APG prompts for the input of random keyboard keys, and then, after pressing '''ENTER''', produces output similar to this: <pre><nowiki> queafWodEis5 (queaf-Wod-Eis-FIVE) WoudElIc6 (Woud-El-Ic-SIX) GorIacNewt8 (Gor-Iac-Newt-EIGHT) ShratUplEov7 (Shrat-Upl-E-ov-SEVEN) hexLyafByff1 (hex-Lyaf-Byff-ONE) Irkyorn9 (Irk-yorn-NINE) </nowiki></pre> If you would like to enforce different behavior from APG, there are many options you may pass to the '''apg''' command for the purpose of changing the default output, and behavior of APG. For example, to generate ''random character passwords'' instead of the ''pronounceable'' passwords, you may invoke APG with the '''-a 1''' option, where '''-a''' is the ''algorithm'' APG uses, and '''1''' selects random mode. The following command would produce ''six'' (6) random character passwords with no prompting to input random data: <code><nowiki> apg -a 1</nowiki></code> Upon executing the above command, APG outputs a list of ''six'' (6) random character passwords similar to these: <pre><nowiki> S:w[AOe< !_IlD#_G/~ )lL`avASe6 SgzlI:lU?h ~Wc(0b"{ '4fU25w%} </nowiki></pre> If you wish to always enforce prompting for random data from standard input (keyboard), to ensure the most secure passwords possible, you should explicitly tell APG to do so with the <code><nowiki>-s</nowiki></code> option. Another example would be the generation of four (4) WiFi Protected Access (WPA) Pre Shared Keys (WPA PSKs) having the maximum supported WPA PSK length of 63 random characters for use with modern WiFi equipment, such as a Wireless Access Point (WAP). To generate such a sequence, and use random data prompting, issue the following command at a command prompt: <code><nowiki>apg -s -a 1 -m 63 -n 4</nowiki></code> After supplying the random keyboard data, and pressing '''ENTER''' a list of strong WPA PSKs will be presented, similar to these: <pre><nowiki> +DIaz*<DmO6VAFR/cQ>B^'[mtB;J1ABi*n"B<=|_My"5bZv#*iRJH!0oCcf!,@Z os#?3;sC2}/A>lG<sup>e*9%9}pd^&A\'eLkdC,lk#jB,bcg70I|q@U:</sup>VZP"}>3z?G rj??<_Ej%-:2LW;4q_?53$ab$U_~1I(({`^LN1Hd&&gKj+Dw;EqR<\qH_VQ{`s! "x3up};b~/jU6Vo,t">Dr~f_U`NSNr30JmOD@c'Y:p2wvc"0s?$MtT<S5Qr\AZi </nowiki></pre> Many other options are available. You should consult the APG manual page, and the APG website for further information. (see the '''Resources''' section of this guide) === Generating Strong Passwords Manually === Some people find that they remember their password better when they come up with one on their own. This section provides an example of how to manually generate a strong password. Keep in mind that because the examples here are viewable by anyone, these exact results should be avoided. The first step is to choose a phrase which you can easily remember, but is at least 8 words long. This can be a favourite quote, a line from your favourite song, something you heard randomly while walking around, or even an obscure reference to a movie you like. For this example, we'll choose "`To be or not to be, that is the question`". Now, convert your phrase to a single word. Exactly how you do so is not important, as long as you remember how you did it! We'll take the first letter of each word, which gives us "`tbontbtitq`". Now, we have one character class, the lower case letter. To get upper case letters, simply randomly capitalize letters. We'll capitalize each third letter, and end up with "`tbOntBtiTq`". Now, we'll get some numbers. That '`O`' looks a lot like the number zero, so let's replace '`O`' with '`0`': "`tb0ntBtiTq`". There's a lot of '`T`' characters in there, so let's also replace two of them with the number '`7`': "`tb0n7BtiTq`". Finally, we'll go after a symbol or two. With a little imagination, you can see how the symbol '`<sup>`' and the letter '`l`' beside each other somewhat resemble the general shape of the letter '`N`', so replace the '`n`' with those: "`tb0^l7BtiTq`". Just to make it a little better, we'll add one last symbol. You'll notice that the exclaimation point (`!`) resembles a lower case '`i`' upside down. Replace the '`i`' with '`!`' to get the final password: "`tb0</sup>l7Bt!Tq`". === Resources === Additional password information, command information, and formal password policy guidelines are available via the following resources: [http://packages.ubuntu.com/pwgen pwgen] is an alternative to apg that will create reasonable secure passwords that are easier to remember. ==== Local System Resources ==== {|border="1" cellspacing="0" |<code><nowiki>man apg</nowiki></code>|| System manual page for the <code><nowiki>apg</nowiki></code> command |- |<code><nowiki>man passwd</nowiki></code>|| System manual page for the <code><nowiki>passwd</nowiki></code> command |} ==== WWW Resources ==== [http://www.adel.nursat.kz/apg/ APG website] [http://searchsecurity.techtarget.com/tip/1,289483,sid14_gci916934,00.html?track=sap805 Bad Password Policies] [http://www.sans.org/resources/policies/Password_Policy.pdf SANS Password Policy Guideline (PDF Document)] [http://www.sans.org/rr/whitepapers/authentication/1636.php Simple Formula For Strong Passwords (PDF Document)] [http://www.smat.us/sanity/pwdilemma.html#anchor12895273 Strong Password Policies] [http://world.std.com/~reinhold/diceware.html The Diceware Passphrase Home Page] [https://www.grc.com/passwords.htm Steve Gibson's Ultra High Security Password Generator] ---- [[category:CategorySecurity]] [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:StrongPasswords
。