Generate Secure Passwords Using Built-in Tools on macOS, Windows, and Ubuntu

In today’s computing environment, password security is paramount. Different operating systems offer their own tools to generate complex passwords. This article will show you how to use built-in tools on macOS, Windows, and Ubuntu to create secure passw…


This content originally appeared on DEV Community and was authored by Zach Hugo

In today's computing environment, password security is paramount. Different operating systems offer their own tools to generate complex passwords. This article will show you how to use built-in tools on macOS, Windows, and Ubuntu to create secure passwords.

How to Generate Complex Passwords on macOS

Terminal:

  • Use the openssl command to generate a random password:

     openssl rand -base64 16
    

For convenience, you can further package this method into a right-click shortcut using Automator

Automator:

  • Open Automator (found in “Applications”).
  • Choose the “Service” template.
  • Search for and add the “Run Shell Script” action, then paste the following script:

     /usr/bin/openssl rand -base64 16
    
  • Save the service, naming it “Generate Random Password.” You can then use it by right-clicking and selecting “Services” -> “Generate Random Password.”

How to Generate Complex Passwords on Windows

PowerShell:

  • Open PowerShell.
  • Use the following command to generate a random password:

     Add-Type -AssemblyName System.Web
     [System.Web.Security.Membership]::GeneratePassword(16,3)
    

Command Prompt:

  • Use the certutil command to generate random data and convert it to base64:

     certutil -encodehex -f nul - 48 | findstr /v /c:"CertUtil" /c:"48 bytes" /c:"\---" | powershell -Command "$input | ForEach-Object { $_.Trim() }" | out-string | format-hex -u
    

How to Generate Complex Passwords on Ubuntu

OpenSSL:

  • Use the openssl command to generate a random password:

     openssl rand -base64 16
    

/dev/urandom:

  • Use /dev/urandom to generate random data and convert it to base64:

     < /dev/urandom tr -dc A-Za-z0-9 | head -c 16 ; echo ''
    

By using these built-in tools, you can easily generate complex passwords and ensure your accounts are secure.


This content originally appeared on DEV Community and was authored by Zach Hugo


Print Share Comment Cite Upload Translate Updates
APA

Zach Hugo | Sciencx (2024-07-31T03:29:24+00:00) Generate Secure Passwords Using Built-in Tools on macOS, Windows, and Ubuntu. Retrieved from https://www.scien.cx/2024/07/31/generate-secure-passwords-using-built-in-tools-on-macos-windows-and-ubuntu/

MLA
" » Generate Secure Passwords Using Built-in Tools on macOS, Windows, and Ubuntu." Zach Hugo | Sciencx - Wednesday July 31, 2024, https://www.scien.cx/2024/07/31/generate-secure-passwords-using-built-in-tools-on-macos-windows-and-ubuntu/
HARVARD
Zach Hugo | Sciencx Wednesday July 31, 2024 » Generate Secure Passwords Using Built-in Tools on macOS, Windows, and Ubuntu., viewed ,<https://www.scien.cx/2024/07/31/generate-secure-passwords-using-built-in-tools-on-macos-windows-and-ubuntu/>
VANCOUVER
Zach Hugo | Sciencx - » Generate Secure Passwords Using Built-in Tools on macOS, Windows, and Ubuntu. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/31/generate-secure-passwords-using-built-in-tools-on-macos-windows-and-ubuntu/
CHICAGO
" » Generate Secure Passwords Using Built-in Tools on macOS, Windows, and Ubuntu." Zach Hugo | Sciencx - Accessed . https://www.scien.cx/2024/07/31/generate-secure-passwords-using-built-in-tools-on-macos-windows-and-ubuntu/
IEEE
" » Generate Secure Passwords Using Built-in Tools on macOS, Windows, and Ubuntu." Zach Hugo | Sciencx [Online]. Available: https://www.scien.cx/2024/07/31/generate-secure-passwords-using-built-in-tools-on-macos-windows-and-ubuntu/. [Accessed: ]
rf:citation
» Generate Secure Passwords Using Built-in Tools on macOS, Windows, and Ubuntu | Zach Hugo | Sciencx | https://www.scien.cx/2024/07/31/generate-secure-passwords-using-built-in-tools-on-macos-windows-and-ubuntu/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.