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

  Options:

   -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

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

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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