The last topic we’ll cover in this chapter is setting passwords for yourself (and for other users if you have access to superuser privileges). To set or change a password, the
passwd command is used. The command syntax looks like this:
To change your password, just enter the
passwd command. You will be prompted for your old password and your new password:
passwd(current) UNIX password: New UNIX password:
passwd command will try to enforce use of “strong” passwords. This means it will refuse to accept passwords that are too short, are too similar to previous passwords, are dictionary words, or are too easily guessed:
passwd(current) UNIX password: New UNIX password: BAD PASSWORD: ...