Red Hat Bugzilla – Bug 12098
pwck should allow #comments in /etc/passwd
Last modified: 2008-05-01 11:37:56 EDT
We are working in a university where main servers define lots of users in a
single /etc/passwd. Then they are shared to many NIS clients.
We used to group them and to put some comment lines to explain which groups
were for what... Sometimes, we just comment some user out, in case it could
Then we would like to use "pwck" to check that everything was right, but we
got lots of errors because of those comments.
We checked that /var/yp/Makefile did allow comments lines beginning with
"#" and empty lines in source files, as they were harmless in local
processing too. So, why "pwck" is so restrictive about them ?
The various standards don't allow for comments and empty lines
in password files, so pwck is correct in complaining about them.
Using comments in password files may or may not work with any other
operating systems or even with updates, so keeping this check in is
actually a good thing.
"Tell us what you need, we'll tell you how to do without!" :-(
Maybe "other operating systems" don't allow comments in password file
(Windows?), but I thought we had to do with *RedHat Linux* which, AFAIK does
I could imagine that it would have been nice - in a next release, for an
enhancement - to provide some switch to allow them "a la RedHat". Maybe, I'll
get a better luck from Mandrake?