まとめて複数のパスワードを生成する

for文で繰り返し実行

以前紹介したランダムパスワードを自動生成するコマンドのテクニックでランダムパスワードが生成できます。
サーバ管理者としては、複数のユーザ向けに大量のパスワードを生成しなければいけない場面がたまにあります。
そんなとき、1件ずつ作ってコピペするのは大変ですね。端末上でfor文を回してまとめて作りましょう。

[user@myserver] $ for var in 1: 2: 3:
> do
> echo -n $var
> mkpasswd
> done
1:)H0rj1Sgx
2:9Oz8zu%gO
3:ve%5yH7xC

1行で書いて実行もできます。

[user@myserver] $ for var in 1: 2: ; do echo -n $var; mkpasswd; done
1:)H0rj1Sgx
2:9Oz8zu%gO
3:ve%5yH7xC

5 thoughts on “まとめて複数のパスワードを生成する

  1. AlexisBrums

    Examples of Aphorism in Literature
    It originally read, Count not they chickens that unhatched be…
    Luke’s having a tough time, and he’s discouraged.
    Washington’s message was that it’s wiser to be upfront and deal with the consequences.
    Other Common Examples of Aphorisms
    Today, calling someone a Jack of all trades is usually a jab because it implies that their knowledge is superficial.
    From there, you can build your story around it.
    Don’t judge a book by its cover.
    And since they’re universal truths about life, they help persuade your reader to accept your message.
    Another aphorism that’s adapted is, Don’t count your chickens before they hatch.
    It’s one of my favorite aphorisms because it’s simple but yet powerful.
    This aphorism is short and sweet, but it teaches us a valuable truth.
    It’s easier to do it yourself rather than try to explain it to someone else.
    The Purpose & Function of Aphorism
    Give it a try!
    They’re inspirational quotes.

    返信
  2. AlexisBrums

    Both sayings highlight the benefits of waking up early.
    Fall seven times, stand up eight.
    George Washington is known for his wise sayings.
    Sandys said, Honestie the best policie, which in modern English is…
    Yup, he was reminding Philadelphians that preventing fires is better than fighting them.
    Why is this stuff important.
    Your stories can benefit from this method too.
    Now here’s the big question.
    Aphorisms often use metaphors or creative imagery to express ideas.
    Speaking of being safe, that’s another aphorism example that you’ve probably heard before.
    Another example comes from Spider-Man, where Uncle Ben turns to Peter Parker and says, With great power comes great responsibility.
    Like George Washington, Sandys believed that telling the truth is always the way to go.
    He once stated, If you want a thing done well, do it yourself.
    Another memorable aphorism is, An apple a day keeps the doctor away.
    Your stories can benefit from this method too.
    They’re in social media captions all over the web.

    返信
  3. AlexisBrums

    Early to bed and early to rise makes a man healthy, wealthy, and wise.
    Better safe than sorry is a piece of wisdom from Samuel Lover’s book, Rory O’More.
    Examples of Aphorism in Film
    This also reminds me of a precept by Sir Edwin Sandys, a politician who helped establish Jamestown, Virginia.
    Oftentimes, it makes sense to delegate tasks.
    Not good.
    So my advice.
    Truthfully, there aren’t huge differences between the three.
    Guy standing at a bookshelf
    So what do you do.
    Opportunities don’t happen.
    Washington’s message was that it’s wiser to be upfront and deal with the consequences.
    The complete quote was, A Jack of all trades and master of none, but oftentimes better than a master of one.
    It meant that the person was versatile and adept at many things.
    It’s time.
    Don’t judge a book by its cover.

    返信
  4. AlexisBrums

    Aphorisms often use metaphors or creative imagery to express ideas.
    You get up and keep trying.
    Examples of Aphorism in Film
    Napoleon Bonaparte could relate.
    He once stated, If you want a thing done well, do it yourself.
    Aphorisms state universal truths about life that encourage reflection.
    Pick an aphorism that relates to your message and use it to stay focused on your overarching theme.
    They’re inspirational quotes.
    Now that we’ve covered the aphorism definition, are you ready for more examples.
    Better safe than sorry is a piece of wisdom from Samuel Lover’s book, Rory O’More.
    It’s one of the most recognized aphoristic statements today.
    Honesty is the best policy.
    Yup, he was reminding Philadelphians that preventing fires is better than fighting them.
    Finally, All things come to those who wait is a good aphorism we’re all familiar with.
    For example.
    How many times have you heard one of the following aphorism examples.

    返信
  5. BrettBiorp

    VPS SERVER
    Высокоскоростной доступ в Интернет: до 1000 Мбит/с
    Скорость подключения к Интернету — еще один важный фактор для успеха вашего проекта. Наши VPS/VDS-серверы, адаптированные как под Windows, так и под Linux, обеспечивают доступ в Интернет со скоростью до 1000 Мбит/с, что гарантирует быструю загрузку веб-страниц и высокую производительность онлайн-приложений на обеих операционных системах.

    返信

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です