Source: techrepublic.com

To change your own password from the command line:

passwd

To change the password for another user, you must use sudo:

sudo passwd