Generate a new password for the specified user. The passwords produced are hard to guess and therefore more secure than passwords made up by actual people. Some operating systems distribute a different mkpasswd command, which regenerates the user password database; if your system has this version, check the manpage for instructions on how to use it.
If you do not specify a user, mkpasswd will display a new password. If you do specify a user, make sure that you have permission to set their password; this will usually mean being root.
Generate a password that is n characters long. The default is 9.
Generate a password with at least n digits in it. The default is 2.
Generate a password with at least n lowercase letters in it. The default is 2.
Set the minimum number of uppercase letters in the password. The default is 2.
Generate a password with at least n special characters in it. The default is 1.
Set the program used to actually set the password. If you do not choose one, the system will try to use yppasswd, or, if that is not installed, passwd.
Choose characters in the password so that, on a QWERTY-style keyboard, they alternate between left and right hand keys. This makes it harder for someone to guess what the password is if they watch you type it, but can make automated attacks easier.
Verbose mode; display the interaction between mkpasswd and the system as it sets the password. ...