Cygwin mkpasswd giving The format of the specified domain name is invalid

Corinna Vinschen corinna-cygwin@cygwin.com
Tue May 14 10:20:00 GMT 2013


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


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /