'\" te .\" Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. .\" Copyright 1989 AT&T .TH pwck 1M "27 Aug 2008" "SunOS 5.11" "System Administration Commands" .SH NAME pwck, grpck \- password/group file checkers .SH SYNOPSIS .LP .nf \fB/usr/sbin/pwck\fR [\fIfilename\fR] .fi .LP .nf \fB/usr/sbin/grpck\fR [\fIfilename\fR] .fi .SH DESCRIPTION .sp .LP \fBpwck\fR scans the password file and notes any inconsistencies. The checks include validation of the number of fields, login name, user ID, group ID, and whether the login directory and the program-to-use-as-shell exist. The default password file is \fB/etc/passwd\fR. .sp .LP \fBgrpck\fR verifies all entries in the \fBgroup\fR file. This verification includes a check of the number of fields, group name, group ID, whether any login names belong to more than \fBNGROUPS_MAX\fR groups, and that all login names appear in the password file. \fBgrpck\fR also issues a warning if it finds an entry (a single line) in the \fBgroup\fR file longer than 2047 characters. Such an entry causes group maintenance commands, such as \fBgroupdel\fR(1M) and \fBgroupmod\fR(1M), to fail. .sp .LP The default group file is \fB/etc/group\fR. .sp .LP All messages regarding inconsistent entries are placed on the \fBstderr\fR stream. .SH FILES .RS +4 .TP .ie t \(bu .el o \fB/etc/group\fR .RE .RS +4 .TP .ie t \(bu .el o \fB/etc/passwd\fR .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/core-os .TE .SH SEE ALSO .sp .LP \fBgroupdel\fR(1M), \fBgroupmod\fR(1M), \fBgetpwent\fR(3C), \fBgroup\fR(4), \fBpasswd\fR(4), \fBattributes\fR(5) .SH DIAGNOSTICS .sp .LP Group entries in \fB/etc/group\fR with no login names are flagged. .sp .ne 2 .mk .na \fB\fBGroup file '\fR\fIfilename\fR\fB\&' is empty\fR\fR .ad .sp .6 .RS 4n The \fB/etc/passwd\fR or \fB/etc/group\fR file is an empty file. .RE .sp .ne 2 .mk .na \fB\fBcannot open file\fR \fIfilename\fR\fB: No such file or directory\fR\fR .ad .sp .6 .RS 4n The \fB/etc/passwd\fR or \fB/etc/group\fR file does not exist. .RE .SH NOTES .sp .LP If no filename argument is given, \fBgrpck\fR checks the local group file, \fB/etc/group\fR, and also makes sure that all login names encountered in the checked group file are known to the system \fBgetpwent\fR(3C) routine. This means that the login names may be supplied by a network name service.