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: Cygwin mkpasswd giving The format of the specified domain name is invalid

On May 14 11:01, Sorin Sbarnea wrote:
> Hi,
> I am unable to make mkpasswd/mkgroup to work on a Windows 2003 R2
> Enterprise x64.
> While trying to finish Cygwin config and running mkpasswd -l -d and
> mkgroup, it fails with the following error:
> $ mkpasswd -l -u sorins -d /etc/passwd

Ouch.  mkpasswd always sends the output to stdout.  mkpasswd --help
would have shown you:

  $ mkpasswd --help | head -14
  Usage: mkpasswd [OPTIONS]...

  Print /etc/passwd file to stdout


   -l,--local [machine[,offset]]
                           print local user accounts with uid offset offset
                           (from local machine if no machine specified)
   -L,--Local [machine[,offset]]
                           ditto, but generate username with machine prefix
   -d,--domain [domain[,offset]]
                           print domain accounts with uid offset offset
                           (from current domain if no domain specified)

By just specifying /etc/passwd after the -d option, mkpasswd handles it
as domain name and this clearly isn't a domain name.  You're missing the
io redirection:

  $ mkpasswd -l -u sorins -d > /etc/passwd


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

Problem reports:
Unsubscribe info:

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