delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/18/17:51:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 18 Jul 2005 17:51:07 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: henning AT hhschmidt DOT de
cc: cygwin AT cygwin DOT com
Subject: Re: verify login info on Windows
In-Reply-To: <42DC0DA5.6060402@gmx.net>
Message-ID: <Pine.GSO.4.61.0507181729490.19690@slinky.cs.nyu.edu>
References: <42DC0DA5 DOT 6060402 AT gmx DOT net>
MIME-Version: 1.0

On Mon, 18 Jul 2005, H. Henning Schmidt wrote:

> I am developing a server application that accepts logins from a client
> over a proprietary protocol.
> I want to let clients login (username/password) before allowing anything
> else.  I want to let them use username/password information as it is
> stored in the regular system user database, so I do not need to maintain
> another such database.  On Unix this would be /etc/passwd or
> /etc/shadoww and the associated libraray calls.
>
> However, on my Cygwin box, the /etc/passwd (as created by mkpasswd) does
> not contain the password. Instead the appropriate field reads
> unused_by_nt. After googling along for a while I have understood that
> this is done so that the real login/security info can be maintained by
> the regular windows system.  Fine. But how do I get to it? I have not
> found any example/explanation that answers this question:
>
> given two const char* variables user and password, how can I find out if
> this combination is a valid login on this current Windows/Cygwin box?
>
> This might be a pute Windows issue (as oposed to Cygwin) ... however,
> with a Linux-only knowledge of system calls, I have no clue how to
> approach this anyways.

How about looking at the source of some program that actually does such
authentication?  Searching for the string "cygwin" in auth-passwd.c in
openssh sources is one approach.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019