關於 PHP, Linux, Open Source 及個人生活記載的網誌。
RSS icon
  • Linux 產生隨機密碼

    Posted on April 20th, 2008 Sam Tang No comments

    以下指令可以在 command line 產生隨機密碼

    <g; /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c6

    以上指令會產生 6 個位的密碼,如果想改變密碼長度,可以修改最後的 -c6,例如要 8 個位的密碼,便改為 -c8


    Leave a reply

    *
    To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
    Click to hear an audio file of the anti-spam word