Editing the Password File #

In order to edit the password file on OpenBSD, it is advised to use the vipw utility. This utility handles all the required steps to ensure the continued correct functioning of the system.

Multiple files are part of the password system on OpenBSD.

  • /etc/master.passwd

This file is the ultimate source of truth and is only readable by the root user. It should not be edited directly.

  • /etc/passwd

This file is readable for all users. It is created by the pwd_mkdb utility.

  • password databases

/etc/pwd.db and /etc/spwd.db are the actual databases as their names suggest. They are also created/generated by the pwd_mkdb utility.