Q. How do I change a password under FreeBSD or Linux (UNIX) operating systems?
A. The FreeBSD passwd utility changes the user's local, Kerberos, or NIS password. If the user is not the super-user, passwd first prompts for the current password and will not continue unless the correct password is entered.
Choosing a good password
It is a good idea to change password once a month or week. Make sure you change the password when admin gives you first time account information including a password to log on.
- The new password should be at least six characters long and not purely alphabetic.
- Its total length must be less 128 characters.
- The new password should contain a mixture of upper and lower case characters
- In all other situations, numbers, upper case letters and meta characters are encouraged.
- It should not be similar to the login id
- Please note that all UNIX / BSD / Linux password are case sensitive
Changing your own password
Just type passwd and hit [Enter] key:
So before the password can be changed, the current password must be supplied. When entering the new password, the characters entered do not echo, in order to avoid the password being seen by a passer-by. The passwd utility prompts for the new password twice in order to detect typing errors.
Changing other users password
You must login as the root user. To change password for user tom, enter:
# passwd tom
A note about passwd command
passwd command works with all UNIX, Linux, BSD and UNIX like oses. For more information read passwd man page:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop