Subject: Re: pwck
From: Brian Dessent <[email-masked]>
To: [email-masked]
Date: Thu, 03 Feb 2005 02:48:42 -0800

Dave Korn wrote:

>   Well, what it means is that there's no official, maintained port of it as a
> cygwin package.  In that case, you really have three options left:
> 
> 1)  Google for it, and hope you can find an unofficial port to cygwin that
> someone has done.
> 
> 2)  Get the source code and try to port it yourself - an awful lot of well
> written open source will just build under cygwin OOTB.
> 
> 3)  Find an alternative with similar functionality
> 
> [  Ok, four options:
> 
> 4)  Do without! ]
> 
> I suspect option 3) is going to be the answer in your case, I'm afraid, because
> if I'm guessing rightly from the name 'shadow-utils', this is something for
> manipulating shadowed passwords, which isn't the system by which either cygwin
> or windows works.

To the original poster, there are a couple of things to be aware of. 
Cygwin's passwd file is meant to be a mirror of the user information
stored in Windows user accounts.  It is there for programs that expect
there to exist a passwd file, but it is not a primary source of
information.  It does not contain passwords, for example.  There are
some things you can accomplish by editing a Cygwin passwd file, but
things like adding/deleting users or changing passwords must be done
using Windows own user/group configuration methods.

Further, the Cygwin passwd file differs subtly from a standard linux
passwd file, but remains compatible.  If your aim is to use pwck to
check a linux passwd file from Cygwin, then compiling a port of it
should work fine.  However if you intend to check a Cygwin passwd file
for validity then the linux based tools may not understand some fields
of the file, and you will have to adapt the code accordingly.

To put it another way, the Cygwin passwd file is automatically generated
by the mkpasswd program and is usually not edited by hand, and so there
is likely to be little need for the pwck program, which is why it does
not exist in the Cygwin distribution.  If your intention is to check
linux passwd files the a simple compilation of the utility should work
fine, but if your intention is to check the validity of Cygwin passwd
files then there will be some adaptation necessary of the linux tools.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/