This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: mkpasswd -p option now adds username


> -----Original Message-----
> From: cygwin-owner On Behalf Of Estey, Debora J
> Sent: 30 April 2004 14:43

> Hi,
> 
>  I have just down loaded the latest cygwin (1.5.9-1).
>  I have a script to add users to the password file, the first 
> time they
> bring up cygwin. 
>  The script is using the -p option of the mkpasswd to add 
> their home to the
> passwd file. This
>  did work fine but, in the latest cygwin, the users id is 
> added to the end
> of the path that was specified. Why did this change?
>  Our users home directory does not end with their user id.
> 
>   thanks

  If it never used to add the username to the end of the -p option, then how
come all your users didn't end up sharing a single home directory, since you
can only pass one -p option to mkpasswd but it prints out passwords for the
entire user list?

  Exactly.  It did work that way all along, despite what you think.  See for
yourself - it hasn't changed at all in the last five months

-------------->snip!<--------------
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/utils/mkpasswd.c?cvs
root=src

Revision 1.33 / (download) - annotate - [select for diffs] , Fri Nov 14
19:14:43 2003 UTC (5 months, 2 weeks ago) by corinna 
Branch: MAIN 
CVS Tags: cr-0x9e, cr-0x9d, HEAD 
Changes since 1.32: +5 -5 lines
Diff to previous 1.32 (colored) 
	* mkgroup.c: Avoid compiler warnings throughout.
	* mkpasswd.c: Ditto.
	* passwd.c: Ditto.
-------------->snip!<--------------

  There was a change about a year ago (rev 1.30) that updated the usage info
for the -p option, but that's all.  Look, let me prove it to you: first I
get both the latest mkpasswd sources and old ones from before that change:

-------------->snip!<--------------
dk@mace /davek/mkpass> wget -O mkpasswd-1.29.c
"http://sources.redhat.com/cgi-b
in/cvsweb.cgi/~checkout~/src/winsup/utils/mkpasswd.c?rev=1.29&content-type=t
ext
/plain&cvsroot=src"
--16:11:43--
http://sources.redhat.com/cgi-bin/cvsweb.cgi/%7Echeckout%7E/src/wi
nsup/utils/mkpasswd.c?rev=1.29&content-type=text/plain&cvsroot=src
           => `mkpasswd-1.29.c'
Resolving sources.redhat.com... 67.72.78.213
Connecting to sources.redhat.com[67.72.78.213]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]

    [   <=>                               ] 18,573        26.36K/s

16:11:46 (26.36 KB/s) - `mkpasswd-1.29.c' saved [18573]

dk@mace /davek/mkpass> wget -O mkpasswd-1.33.c
"http://sources.redhat.com/cgi-b
in/cvsweb.cgi/~checkout~/src/winsup/utils/mkpasswd.c?rev=1.33&content-type=t
ext
/plain&cvsroot=src"
--16:11:54--
http://sources.redhat.com/cgi-bin/cvsweb.cgi/%7Echeckout%7E/src/wi
nsup/utils/mkpasswd.c?rev=1.33&content-type=text/plain&cvsroot=src
           => `mkpasswd-1.33.c'
Resolving sources.redhat.com... 67.72.78.213
Connecting to sources.redhat.com[67.72.78.213]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]

    [    <=>                              ] 18,533        14.97K/s

16:11:57 (14.97 KB/s) - `mkpasswd-1.33.c' saved [18533]
-------------->snip!<--------------

  Next I build them both into executables, run them, and save the output to
text files:

-------------->snip!<--------------
dk@mace /davek/mkpass> gcc -O0 -g mkpasswd-1.29.c -o mkpasswd-1.29
dk@mace /davek/mkpass> gcc -O0 -g mkpasswd-1.33.c -o mkpasswd-1.33
dk@mace /davek/mkpass> ./mkpasswd-1.29 -l -d -p /this/is/a/home/path
>output-1.
29.txt
dk@mace /davek/mkpass> ./mkpasswd-1.33 -l -d -p /this/is/a/home/path
>output-1.
33.txt
-------------->snip!<--------------

  Ok, let's compare those files, and see if mkpasswd is generating any
different output since this time last year:

-------------->snip!<--------------
dk@mace /davek/mkpass> diff output-1.29.txt output-1.33.txt
2a3,10
> ACTUser:unused_by_nt/2000/xp:1008:513:Application Center Test
Account,U-MACE\A
CTUser,S-1-5-21-
-------------->snip!<--------------

  Wow.  There does seem to be a lot of differences.  I had to snip them out
for security reasons.  So you might think that this shows you to be right
that mkpasswd has changed.  But look again:

-------------->snip!<--------------
dk@mace /davek/mkpass> sort <output-1.29.txt > sorted-1.29.txt
dk@mace /davek/mkpass> sort <output-1.33.txt > sorted-1.33.txt
dk@mace /davek/mkpass> diff sorted-1.29.txt sorted-1.33.txt
dk@mace /davek/mkpass>
-------------->snip!<--------------

  Nothing has changed about the output of mkpasswd -p except the order in
which it spits out the lines since this time last year.  QED.

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]