AIX, Security, System Admin↑ Generating random passwords

When you set up a new user account, and assign a password to that account, you'll want to make sure that it is a password that can not be easily guessed. Setting the initial password to something easy like "changeme", only allows hackers easy access to your system.

So the best way you can do this, is by generating a fully random password. That can easily be achieved by using the /dev/urandom device.

Here's an easy command to generate a random password:

# dd if=/dev/urandom bs=16 count=1 2>/dev/null | openssl base64 | sed "s/[=O/\]//g" | cut -b1-8

This will create passwords like:

ej9yTaaD
Ux9FYusx
QR0TSAZC
...
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Using expect to automate mundane tasks
Viewed 1987 times since Mon, Jun 3, 2019
Kerberos, Active Directory and AIX
Viewed 6468 times since Mon, Jun 25, 2018
Useful AIX commands
Viewed 9695 times since Sun, Jun 17, 2018
Trouble Shooting AIX Networking
Viewed 2660 times since Tue, May 22, 2018
System Admin Mirrorvg without locking the volume group
Viewed 3193 times since Mon, May 21, 2018
Changing Ethernet Media Speed for AIX
Viewed 3472 times since Tue, Apr 16, 2019
Part 1, Network overview - Monitoring the hardware
Viewed 5412 times since Mon, Jun 4, 2018
Using Shell Redirection: All About the Here-Doc
Viewed 10417 times since Wed, May 30, 2018
AIX FC Performance improvements for IBM AIX FC and FCoE device driver stacks
Viewed 5939 times since Fri, Jan 31, 2020
Rootvg Mirroring in AIX
Viewed 2839 times since Mon, May 21, 2018