Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Strong Password

Posted on May 15, 2017 By David Kittell

Need help with what a strong password is?

Strong password recommendations are as follows:

  • Must contain 14 or more characters
  • Must contain upper and lower case letters
  • Must contain a number or special character (e.g. !@#$%^)
  • Must NOT be the same as your previous 12 passwords
  • Must NOT be similar to your username
  • Must NOT contain any sequence such as 123…, or abc…

Passwords can be easy to remember still and be secure, example:
1@m.$tr0ng3r.Th@n.1.L00k

I tend to tell people to come up with their own alpha/numeric character replacements.
Once you have your own method you can make a really secure password.

  • 1 = Lower case i or upper case i or lower case L
  • @ = a or A
  • 3 = e or E
  • $ = s or S
  • 0 (zero) = Lower case O or upper case O

This is a quick function I put together to take care of the above logic

function CleanUpPassword()
    {
        DirtyPassword="$1"
        echo "Dirty Password: $DirtyPassword"

        # Replace i, I, l with a number one
        CleanPassword=$(echo "$DirtyPassword" | sed "s|i|1|g" )
        CleanPassword=$(echo "$CleanPassword" | sed "s|I|1|g" )
        CleanPassword=$(echo "$CleanPassword" | sed "s|l|1|g" )

        # Replace a, A with @
        CleanPassword=$(echo "$CleanPassword" | sed "s|a|@|g" )
        CleanPassword=$(echo "$CleanPassword" | sed "s|A|@|g" )

        # Replace e, E with 3
        CleanPassword=$(echo "$CleanPassword" | sed "s|e|3|g" )
        CleanPassword=$(echo "$CleanPassword" | sed "s|E|3|g" )

        # Replace s, S with $
        CleanPassword=$(echo "$CleanPassword" | sed "s|s|$|g" )
        CleanPassword=$(echo "$CleanPassword" | sed "s|S|$|g" )

        # Replace o, O with a number zero
        CleanPassword=$(echo "$CleanPassword" | sed "s|o|0|g" )
        CleanPassword=$(echo "$CleanPassword" | sed "s|O|0|g" )

        echo "Clean Password: $CleanPassword"
    }

Example:

CleanUpPassword Iam.stronger.Than.I.Look

As a result you get this result

Dirty Password: Iam.stronger.Than.I.Look
Clean Password: 1@m.$tr0ng3r.Th@n.1.L00k
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

CentOS Code Fedora Mac OSX Red Hat Ubuntu UNIX UNIX Shell Scripts Windows

Post navigation

Previous post
Next post

Related Posts

PHP CLI – Restrict to CLI Only

Posted on October 27, 2015

Sometimes it’s easier to run a PHP script than to run a UNIX bash/shell script, this code below will require the use of PHP CLI and prevent it from running in a web browser. Typically a good idea to place the PHP file out of the web directory as well….

Read More

MySQL to MSSQL Data Conversion

Posted on October 18, 2014October 26, 2015

Ever have to take a MySQL database and put it in Microsoft SQL? This is a MySQL dump script that will assist you in this conversion. Only problem that I’ve had with it is that you need to review the exported SQL and make sure your version of Microsoft SQL…

Read More

PHP – Latitude Latitude to Maidenhead Grid – HAM Radio

Posted on June 14, 2020August 17, 2024

Recently I was asked by a HAM Radio friend to work on a conversion of latitude and longitude coordinates to maidenhead grid. The code below is in “rough” PHP code on purpose to help illustrate the math behind the conversion. Feel free to clean/optimize it all I ask is that…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes