
364
|
Chapter 3: Linux Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
pwck
pwck [options] [files]
System administration command. Remove corrupt or duplicate
entries in the /etc/passwd and /etc/shadow files. pwck will prompt
for a “yes” or “no” before deleting entries. If the user replies “no,”
the program will exit. Alternate passwd and shadow files can be
checked. If correctable errors are found, the user will be encour-
aged to run the usermod command.
Option
-q Run in quiet mode. Only report serious problems.
-r Run in noninteractive read-only mode, answering all ques-
tions no.
-s Don’t check integrity, just sort entries by UID.
Exit status
0 Success.
1 Syntax error.
2 One or more bad password entries found.
3 Could not open password files.
4 Could not lock password files.
5 Could not write password files.
pwconv
pwconv
pwunconv
System administration command. Convert unshadowed entries in
/etc/passwd into shadowed entries in /etc/shadow. Replace the
encrypted password in /etc/password with an x. Shadowing pass-
words keeps them safe from password-cracking programs. pwconv
creates additional expiration information for the /etc/shadow file
from entries in your /etc/login.defs file. If you add new entries to
the /etc/passwd file, you can run pwconv again to transfer the new
information to /etc/shadow. Already shadowed entries are ignored. ...