OpenBSD: Change Password

in Categories last updated December 6, 2010

How do I change root user or any other user account password under OpenBSD operating systems?

You need to use the passwd command. It can changes the user’s local password stored in /etc/master.passwd file, Kerberos, or YP password. A root user can change any users password. Normal user can only change their own password.

Task: OpenBSD Change root User Password

Login as root user and enter:
# passwd

Task: OpenBSD Change Other User Account Password

Login as root user and enter:
# passwd {userName}
To change the password for tom user account, enter:
# passwd tom

Task: OpenBSD Change Your Own Password

Simply type the passwd command:
$ passwd
First, the user is prompted for their current password. If the current password is correctly typed, a new password is requested. The new password must be entered twice to avoid typing errors.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

Share this on (or read 2 comments/add one below):

2 comment

    Have a question? Post it on our forum!