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: Testers needed: New passwd/group handling in Cygwin


On Feb 13 13:40, Larry Hall (Cygwin) wrote:
> On 2/13/2014 1:33 PM, Lord Laraby wrote:
> >Subject: Re: get rid of getpwent? (Was: cygwin-1.7.28 getpwent header
> >declaration changes ?)
> >
> >This would be a nice mechanism for typical windows home systems except for
> >the format of the cygwin tag that goes in the comment field. Home users
> >that utilize 'net user USERNAME "/comment:yadda yadda"' command cannot use
> >equal signs on the command line, and the entire string has to be quoted to
> >prevent angle brackets from messing with redirection. Equal signs are
> >stripped by CMD.exe and the nexted quotes are stripped as well.
> >
> >Example: I entered the following at elevated cmd prompt,
> >
> >C:\WINDOWS\system32>net user TestUser "/comment:<cygwin check="maybe"
> >then="okay>"
> >The command completed successfullly.
> >
> >C:\WINDOWS\system32>net user TestUser
> >User name                   TestUser
> >Full name                   Test User
> >Comment                     <cygwin check=maybe then=okay>
> >...
> >The command completed successfullly.
> >
> 
> Corinna's email with a description of this entire mechanism recommends this
> syntax:
> 
> >   CMD example:
> >
> >     net use corinna /comment:"<cygwin home=\"/home/foo\"/>"
> 
> Does that work for you?

Sigh.  I read my mail at least 6 or 7 times, but never once it occured
to me that I mistyped the commands.

It's `net user', of course, not `net use'.  Oh holy naÃvetÃ.

So again, either use

  net user corinna /comment:"<cygwin home=\"/home/foo\"/>"

from CMD (double quotes, escaping double quotes in the string) or

  net user corinna /comment:'<cygwin home="/home/foo"/>'

from bash or tcsh (single quotes around the string, no escaping
of double quotes inside the string).

You are aware that you can start a Cygwin shell elevated as well, right?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpv8FfltPalK.pgp
Description: PGP signature


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