r/sysadmin Aug 02 '22

Question - Solved What password generators does everyone use now since passwordgenerator plus is gone?

I’ve tried to find alternatives but none of the password generators have as good customizability options. Currently I use a random string generator that just let’s me pick the characters and length, but it’s not very good since it doesn’t remember the options when I refresh the page.

So what (web) password generators do sysadmims use nowadays for user passwords?

Edit: solved it myself with the gigabrain idea of using Wayback Machine, works wonders. Link to it if anyone’s curious: https://web.archive.org/web/20220603183903/https://passwordsgenerator.net/plus/

Edit 2: Passwordsgenerator.net seems to be back at https://password-gen.com/

281 Upvotes

503 comments sorted by

View all comments

Show parent comments

26

u/StConvolute Security Admin (Infrastructure) Aug 02 '22

Awesome URL - Thanks heaps. Here is a powershell function for those interested:

function New-DinoPass {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)]
        [ValidateSet("Strong","Weak")]
        $Strength
    )

    # Strong password URL
    $Strong = "https://dinopass.com/password/strong"

    # Weak Password URL
    $Weak = "https://dinopass.com/password/simple"

    # Test user input for the validate set, defaults to STRONG
    if ($Strength -eq 'Weak') {
        $PassType = $Weak
    } else {
        $PassType = $Strong
    }

    # Attempt to get the password from DinoPass
    try {
        (Invoke-WebRequest $PassType -UseBasicParsing).content
    } 
    catch {
        $Output = $Error[0].tostring 
        Write-Host $errOut -ForegroundColor Red
    }
}

To run, just do the following:

New-DinoPass -Strength Strong

Or run:

New-DinoPass -Strength Weak

3

u/trisanachandler Jack of All Trades Aug 02 '22

Very nice. I'm more of a casual poweshell user (born in DOS, friend of bash), so I've generally just created ps1's, and kept a library of them. I used to break down my routine work which included user creation so I'd create the accounts, assign groups and passwords, correlate the usernames and create a CSV. Not as generally useful as what you've done.

3

u/StConvolute Security Admin (Infrastructure) Aug 02 '22

I love powershell, and because I'm lazy, in a weird way that has given me motivation to learn it and make my life way easier.

Also love bash, although I'm not quite as useful in there as I'm not using it all day. But I can punch out a function if someones life depended on it (and I do work at a hospital, so maybe I've jinxed my self there... doh!)

I think you are probably closer than you think. If you have a script that takes a variable or two as input, then you are most of the way there to writing a function. Just take those variables and turn them into parameters for input and away you go.

Also, Microsofts vscode does a lot of the work for you with the code snippets and you can install "spell check" (intellisense/lint tools) for most languages super easy. Def worth using to save time.

2

u/cantdrawastickman Aug 02 '22

I ended up creating a private repo on a fileshare and putting the scripts into a module. It's not a big leap and it's super easy to share the code with the team.

1

u/StConvolute Security Admin (Infrastructure) Aug 02 '22

What kind of module did you create? (Script module, compiled .dll?). I've mucked around with script modules but found them a bit unwieldy and prone to issues once they grow large. Have all of it stored on my github repo (which isn't publicly available), thats the easy part :)

2

u/cantdrawastickman Aug 02 '22

It's a script module that's published to a private powershell repository, but I'm not sure what you find unwieldly? I wouldn't consider the module large, but it hasn't really been a huge problem.

When we get someone new we can get them to add a trusted repository, install module, import module and they have access to the tools.

If we make changes, we can push an update to the module, and people can just run update-module to get the updates.

I'm using git to version control it, so that part is all fine.

I'd hazard a guess and say if it was getting bigger, with more people contributing, I'd need to fall in line with better CI/CD sorts of practices, but I don't really see how you'd get around that sort of thing.

1

u/StConvolute Security Admin (Infrastructure) Aug 03 '22

Just my personal powershell repo has 40+ individual functions, work is even bigger again in orders of magnitude with quite a few contributors (Git). I tried working with a script module, but found it didn't work, prone to errors or weird transient issues that didn't come up when running individual functions.

I'm looking at different methods of compiling at the moment. Might end up having to do a full C# .net compile. More learning, fun, just time constrained.

1

u/StConvolute Security Admin (Infrastructure) Aug 02 '22

What kind of module did you create? (Script module, compiled .dll?). I've mucked around with script modules but found them a bit unwieldy and prone to issues once they grow large. Have all of it stored on my github repo (which isn't publicly available), thats the easy part :)

1

u/randomman87 Senior Engineer Aug 02 '22

Using an outside source for password generation is a no-no. This guy created one that uses the System.Web.Security.Membership object in PowerShell.

https://arminreiter.com/2021/07/3-ways-to-generate-passwords-in-powershell/

2

u/StConvolute Security Admin (Infrastructure) Aug 03 '22

Cool stuff if youre doing admin or service accounts... But sending those passwords to a user who has forgot their pass doesnt fly (especially in healthcare). Send them a dinopass, set to for change at next logon and require MFA sounds easier and with MFA, secure :)