delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/09/13/14:54:30

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Fri, 13 Sep 2002 14:54:19 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: RE: mkpasswd takes 18 hours to finish!
In-Reply-To: <5.1.0.14.2.20020913141745.027833e0@mail.biapo.com>
Message-ID: <Pine.GSO.4.44.0209131436280.19696-100000@slinky.cs.nyu.edu>
MIME-Version: 1.0

On Fri, 13 Sep 2002, rotaiv wrote:

> At 9/13/2002  11:24 AM, Igor Pechtchanski wrote:
>
> Not to be over technical but you should use:
>
>    mkpasswd -d -u MY_USER_ID >> /etc/passwd
>
> This will retrieve a single user from the current domain without
> enumerating all the users.  This takes less than a second on my system
> (around 5,000 users).

Yes, but the original poster's problem was that his username was not in
the default domain.  Thus, your solution won't work.

> An earlier email recommended the following:
>
> >mkpasswd -d MY_DOMAIN -u MY_USER_ID >> /etc/passwd
>
> The problem with this example is if you specify the domain it will still
> enumerate all the user accounts even though a user name was
> specified.  This will still take 18 hours for some people.  According to
> the help, the actually domain name is not needed as it defaults to the
> current domain.

This is not true.

Specifying both the username and the domain name results in extracting
just that one user from the domain (as can be plainly seen from the source
of mkpasswd.c).

It may be that the order of arguments matters, and that the correct way to
specify the username and the domain would be
	mkpasswd -u MY_USER_ID -d MY_DOMAIN >> /etc/passwd
but the point remains the same.

> Another email suggested this syntax:
>
> >mkpasswd -d MY_DOMAIN | grep MY_USER_ID >> /etc/passwd
>
> This will still enumerate all the user accounts but only keeps the
> MY_USER_ID line.  Once again, the actual domain name is not needed and this
> will still take 18 hours.
>
> Regards,
> rotaiv.

The last point is true, but, as far as I could see, was not disputed by
anyone.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

It took the computational power of three Commodore 64s to fly to the moon.
It takes a 486 to run Windows 95.  Something is wrong here. -- SC sig file


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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