On 16 March 2010 18:18, Josh Smith <[email protected]> wrote:
>
>
> Hey everybody.
>
>
> I am using this script at the moment. It a little password generator
> script I was wondering if anyone could help me out.
>
> I would like the First letter to be a Capital and the last two to be any
> digits?
>
> The one that I have puts capitals all over the place and sometimes it
> does not have any number's at all.
>
> I plan to use this for work for the (DRN) I have run out of things to
> put as my password and I am not aloud to have the same password twice

I use pwgen to generate my passwords and a password vault to keep them
as a backup. Most of my important passwords are used well enough that
by now I remember them (and they are strong enough that I don't have
to change them very often).

If you insist on implementing it yourself as a scripting exercise then:
1. Add an uppercase-only string and a digits-only string on top of the
LORD one you already have
2. Split the loop to three - one which picks a first letter from the
uppercase-only string, one which picks 5 characters from LORD and one
which picks 2 characters from the digits-only string.

The way you have it now there is no way to guarantee that the first
character will be an upper-case letter or that the last two will be
digits.

--Amos
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to