Usually this is done using the yppasswd command. After entering this command, you are prompted for the current password, which you wish to change, the new password, and the new password again for confirmation. On some systems, local modifications have been made to the yppasswd command to force users to choose complicated passwords not containing easily guessed words or to force a mixture of upper and lower case characters and numbers. You should thus consult your local systems administrator for site-specific instructions on how to change passwords on your system.
None of the characters entered when you are specifying the old and new passwords will be shown on the screen.
If everything goes fine, the screen will say Password successfully changed. (or something similar) and after you logout, the new password will be effective.
Otherwise some error message will occur. If this happens, try again.