* RE: mkpasswd takes 18 hours to finish!
@ 2002-09-13 8:24 Harig, Mark A.
2002-09-13 8:37 ` Igor Pechtchanski
[not found] ` <Pine.GSO.4.44.0209131122160.19696-100000@slinky.cs.nyu.edu >
0 siblings, 2 replies; 9+ messages in thread
From: Harig, Mark A. @ 2002-09-13 8:24 UTC (permalink / raw)
To: Rick Hellicar (QMP), cygwin
Normally you would use:
mkpasswd -d MY_DOMAIN | grep MY_USER_ID >> /etc/passwd
Of course, now that you have your passwd entry,
you should edit /etc/passwd and extract your
entry from the file, save it to a separate
file, discard /etc/passwd, regenerate it
using 'mkpasswd -l > /etc/passwd', and
add your entry to the new, smaller file.
> -----Original Message-----
> From: Rick Hellicar (QMP) [mailto:Rick.Hellicar@eml.ericsson.se]
> Sent: Friday, September 13, 2002 9:34 AM
> To: 'cygwin@cygwin.com'
> Subject: mkpasswd takes 18 hours to finish!
>
>
> Hi people,
>
> I've been attempting to set up ssh, because, er..., it seems
> to be what everyone else is doing!
>
> Got to the "mkpasswd -d" stage, which listed a bunch of
> people that didn't include me, so I was explicit about the domain:
>
> mkpasswd -d MY_DOMAIN >> /etc/passwd
>
> And it proceeded to list 22,795 of my colleagues and the time
> it took was...
> real 1118m45.573s
> user 2m4.187s
> sys 2m23.515s
>
> Yep - over 18 hours for the command to finish!
> Can anyone beat that?
>
> Rick
>
>
>
> --
> 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/
>
>
--
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/
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: mkpasswd takes 18 hours to finish!
2002-09-13 8:24 mkpasswd takes 18 hours to finish! Harig, Mark A.
@ 2002-09-13 8:37 ` Igor Pechtchanski
[not found] ` <Pine.GSO.4.44.0209131122160.19696-100000@slinky.cs.nyu.edu >
1 sibling, 0 replies; 9+ messages in thread
From: Igor Pechtchanski @ 2002-09-13 8:37 UTC (permalink / raw)
To: Harig, Mark A.; +Cc: cygwin, Rick Hellicar (QMP)
Well, technically you'd use
mkpasswd -l > /etc/passwd
mkpasswd -d MY_DOMAIN -u MY_USER_ID >> /etc/passwd
which should take much less than 18 hours (I hope).
Igor
On Fri, 13 Sep 2002, Harig, Mark A. wrote:
> Normally you would use:
>
> mkpasswd -d MY_DOMAIN | grep MY_USER_ID >> /etc/passwd
>
> Of course, now that you have your passwd entry,
> you should edit /etc/passwd and extract your
> entry from the file, save it to a separate
> file, discard /etc/passwd, regenerate it
> using 'mkpasswd -l > /etc/passwd', and
> add your entry to the new, smaller file.
>
> > -----Original Message-----
> > From: Rick Hellicar (QMP) [mailto:Rick.Hellicar@eml.ericsson.se]
> > Sent: Friday, September 13, 2002 9:34 AM
> > To: 'cygwin@cygwin.com'
> > Subject: mkpasswd takes 18 hours to finish!
> >
> > Hi people,
> >
> > I've been attempting to set up ssh, because, er..., it seems
> > to be what everyone else is doing!
> >
> > Got to the "mkpasswd -d" stage, which listed a bunch of
> > people that didn't include me, so I was explicit about the domain:
> >
> > mkpasswd -d MY_DOMAIN >> /etc/passwd
> >
> > And it proceeded to list 22,795 of my colleagues and the time
> > it took was...
> > real 1118m45.573s
> > user 2m4.187s
> > sys 2m23.515s
> >
> > Yep - over 18 hours for the command to finish!
> > Can anyone beat that?
> >
> > Rick
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.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/
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: mkpasswd takes 18 hours to finish!
[not found] ` <Pine.GSO.4.44.0209131122160.19696-100000@slinky.cs.nyu.edu >
@ 2002-09-13 12:09 ` rotaiv
2002-09-13 12:23 ` Igor Pechtchanski
[not found] ` <Pine.GSO.4.44.0209131436280.19696-100000@slinky.cs.nyu.edu >
0 siblings, 2 replies; 9+ messages in thread
From: rotaiv @ 2002-09-13 12:09 UTC (permalink / raw)
To: cygwin
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).
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.
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.
--
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/
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: mkpasswd takes 18 hours to finish!
2002-09-13 12:09 ` rotaiv
@ 2002-09-13 12:23 ` Igor Pechtchanski
[not found] ` <Pine.GSO.4.44.0209131436280.19696-100000@slinky.cs.nyu.edu >
1 sibling, 0 replies; 9+ messages in thread
From: Igor Pechtchanski @ 2002-09-13 12:23 UTC (permalink / raw)
To: cygwin
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@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.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/
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: mkpasswd takes 18 hours to finish!
[not found] ` <Pine.GSO.4.44.0209131436280.19696-100000@slinky.cs.nyu.edu >
@ 2002-09-13 13:39 ` rotaiv
2002-09-14 11:47 ` David MacMahon
0 siblings, 1 reply; 9+ messages in thread
From: rotaiv @ 2002-09-13 13:39 UTC (permalink / raw)
To: cygwin
At 9/13/2002 02:54 PM, Igor Pechtchanski wrote:
>Yes, but the original poster's problem was that his username was not in
>the default domain. Thus, your solution won't work.
You are correct - missed that point. Sorry.
>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.
Once again, correct if you use the second syntax. For some reason, putting
the -d before -u causes to list all users whereas putting -u before -d only
lists the single user. I fail to see why the order of the switches should
be import but apparently it is.
>The last point is true, but, as far as I could see, was not disputed by
>anyone.
Only reason I brought this up is because the original poster highlighted
the fact it took 18 hours so time was a consideration. By enumerating all
users then using grep, it would still take the same amount of
time. Clearly, if you only want a single user, the '-u -d' combination is
the most efficient.
Regards,
rotaiv.
--
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/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: mkpasswd takes 18 hours to finish!
2002-09-13 13:39 ` rotaiv
@ 2002-09-14 11:47 ` David MacMahon
0 siblings, 0 replies; 9+ messages in thread
From: David MacMahon @ 2002-09-14 11:47 UTC (permalink / raw)
To: cygwin
On Fri, Sep 13, 2002 at 04:24:50PM -0400, rotaiv wrote:
> At 9/13/2002 02:54 PM, Igor Pechtchanski wrote:
> >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.
>
> Once again, correct if you use the second syntax. For some reason, putting
> the -d before -u causes to list all users whereas putting -u before -d only
> lists the single user. I fail to see why the order of the switches should
> be import but apparently it is.
I think the confusion comes from the fact that the domain name is an
argument to mkpasswd itself; it is not an argument to the -d option.
I believe the following two invocations are equivalent...
mkpasswd -d -u USER DOMAIN
mkpasswd -u USER -d DOMAIN
This may be counterintuituive, but that's the way it is. I know,
"Patches graciously accepted..."
Dave
--
David MacMahon, President
Smart Software Consulting
http://www.smartsc.com
--
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/
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: mkpasswd takes 18 hours to finish!
@ 2002-09-16 2:22 Rick Hellicar (QMP)
0 siblings, 0 replies; 9+ messages in thread
From: Rick Hellicar (QMP) @ 2002-09-16 2:22 UTC (permalink / raw)
To: 'cygwin@cygwin.com'
On Fri, 13 Sep 2002, Igor wrote:
> 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.
You're right, Igor. I'd already tried the -u switch and seen that
it didn't appear to work; I'd not thought of the possibility that
the mkpasswd code was sensitive to the order of the command-line
switches!
The answer pops out in under a second using -u before -d. Perfect.
Rick.
--
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/
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: mkpasswd takes 18 hours to finish!
@ 2002-09-13 13:49 Harig, Mark A.
0 siblings, 0 replies; 9+ messages in thread
From: Harig, Mark A. @ 2002-09-13 13:49 UTC (permalink / raw)
To: rotaiv, cygwin
> -----Original Message-----
> From: rotaiv [mailto:rotaiv@biapo.com]
> Sent: Friday, September 13, 2002 4:25 PM
> To: cygwin@cygwin.com
> Subject: RE: mkpasswd takes 18 hours to finish!
>
>
> At 9/13/2002 02:54 PM, Igor Pechtchanski wrote:
>
> >Yes, but the original poster's problem was that his username
> was not in
> >the default domain. Thus, your solution won't work.
>
> You are correct - missed that point. Sorry.
>
> >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.
>
> Once again, correct if you use the second syntax. For some
> reason, putting
> the -d before -u causes to list all users whereas putting -u
> before -d only
> lists the single user. I fail to see why the order of the
> switches should
> be import but apparently it is.
>
> >The last point is true, but, as far as I could see, was not
> disputed by
> >anyone.
>
> Only reason I brought this up is because the original poster
> highlighted
> the fact it took 18 hours so time was a consideration. By
> enumerating all
> users then using grep, it would still take the same amount of
> time. Clearly, if you only want a single user, the '-u -d'
> combination is
> the most efficient.
>
> Regards,
>
> rotaiv.
>
Perhaps this could be made plain in the Cygwin-specific
manual page for mkpasswd? (Clearly, my knowledge of it
was many releases old.)
---
--
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/
^ permalink raw reply [flat|nested] 9+ messages in thread
* mkpasswd takes 18 hours to finish!
@ 2002-09-13 7:17 Rick Hellicar (QMP)
0 siblings, 0 replies; 9+ messages in thread
From: Rick Hellicar (QMP) @ 2002-09-13 7:17 UTC (permalink / raw)
To: 'cygwin@cygwin.com'
Hi people,
I've been attempting to set up ssh, because, er..., it seems to be what everyone else is doing!
Got to the "mkpasswd -d" stage, which listed a bunch of people that didn't include me, so I was explicit about the domain:
mkpasswd -d MY_DOMAIN >> /etc/passwd
And it proceeded to list 22,795 of my colleagues and the time it took was...
real 1118m45.573s
user 2m4.187s
sys 2m23.515s
Yep - over 18 hours for the command to finish!
Can anyone beat that?
Rick
--
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/
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-09-16 7:23 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-13 8:24 mkpasswd takes 18 hours to finish! Harig, Mark A.
2002-09-13 8:37 ` Igor Pechtchanski
[not found] ` <Pine.GSO.4.44.0209131122160.19696-100000@slinky.cs.nyu.edu >
2002-09-13 12:09 ` rotaiv
2002-09-13 12:23 ` Igor Pechtchanski
[not found] ` <Pine.GSO.4.44.0209131436280.19696-100000@slinky.cs.nyu.edu >
2002-09-13 13:39 ` rotaiv
2002-09-14 11:47 ` David MacMahon
-- strict thread matches above, loose matches on Subject: below --
2002-09-16 2:22 Rick Hellicar (QMP)
2002-09-13 13:49 Harig, Mark A.
2002-09-13 7:17 Rick Hellicar (QMP)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).