mkpasswd(8) — Maintenance
NAME
mkpasswd − Creates a version of the basic user database organized for efficient searches
SYNOPSIS
/usr/sbin/mkpasswd −v passwdfile
DESCRIPTION
The mkpasswd command creates an auxiliary version of the basic user database in a form organized for efficient searches by the getpwuid subroutine and the getpwnam subroutine. The mkpasswd command reads the user attributes in the /etc/passwd file and creates a hashed password database in the /etc/passwd.dir and /etc/passwd.pag files (see ndbm(3) reference page).
If you specify a file other than /etc/password, the command reads the user attributes in that file and creates a hashed password database in the passwdfile.dir and passwdfile.pag files. It is important to know that the password file you designate be in password file format (see the passwd(4) reference page.)
Only the root user should have execute access to this command.
Files Accessed:
ModeFile
r/etc/passwd
rw/etc/passwd.pag
rw/etc/passwd.dir
rwpasswdfile
rwpasswdfile.pag
rwpasswdfile.dir
FLAGS
−v Specifies that each stored entry be listed on standard output
EXAMPLES
If you have not used vipw to edit the /etc/passwd and wish to generate a hashed password database, enter the following:
mkpasswd −v /etc/passwd
An auxiliary version of the basic user database (/etc/passwd.dir and /etc/passwd.pag files) is created with a hashing algorithm.
RETURN VALUES
The mkpasswd command exits with a nonzero exit code if any errors are detected.