This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Cygwin mkpasswd giving The format of the specified domain name is invalid
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 14 May 2013 12:19:56 +0200
- Subject: Re: Cygwin mkpasswd giving The format of the specified domain name is invalid
- References: <CAGDPfJosmUDH49uJ=TKx6iLo6pFOJ1ArQ34p6Bd2qr_RYx2NGg at mail dot gmail dot com> <CAGDPfJpf11SjXTAyFUNTM7WpYS5psCaFYWT8d89ZY7HtvmqtEg at mail dot gmail dot com>
- Reply-to: cygwin at cygwin dot com
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