Before getting into how to change a user’s password on FreeBSD, let’s have a quick revision on how that can be done on a Linux system.
As a user we can change the password by typing:
Or with a
root account, we can change/set the password for another user:
How about a FreeBSD? It should be the same way as how it’s done on Linux right? Right? Well, not quite.
On a FreeBSD system, in addition to run the
passwd command, we also need to generate the password databases to be “in sync” with the plain text files.
You can learn more about both
pwd_mkdb, by running: