Name

chpass

Synopsis

    chpass [options] [user]

Change information in the user database. If supplied, the information for user is changed; otherwise, the current user’s information is updated. Only a privileged user may change information for a different user, and several options are restricted to privileged users. chpass places the information into a temporary file and invokes an editor. Once the new values are filled in and the information is verified, the program updates the system’s user database, /etc/master.passwd.

Tip

On Mac OS X, you are probably better off using the graphical system administration tools for user management.

Options

-a list

Use the literal user database entry list directly. It is a colon-separated list of items as found in each line of /etc/master.passwd. Privileged users only.

-e time

Set the account’s expire time to time. Privileged users only.

-p pass

Use pass as the encrypted password. See getpwent(3) for the implications of this option. Privileged users only.

-s shell

Use shell as the user’s shell. Valid shells are listed in /etc/shells.

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.