Checking the Files

As users are added, updated, and deleted it's quite easy for the administrative files to get out of sync with each other—especially if any manual file edits have been performed. Therefore, in this last section we'll look at a few of the utilities that can be used to check and maintain the related files (/etc/passwd, /etc/shadow, and /etc/group).

Pwconv

We've already come across pwconv—it was used in our custom script earlier. It is used to create or update the shadow file, which it does by synchronizing it with the password file.

It uses the second field of /etc/passwd (the encrypted password field) to indicate that the password for this user can be found in /etc/shadow. It does this by moving the encrypted password into

Get Solaris™ Operating Environment Boot Camp 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.