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

cygwincygwin-sshd

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
sorins:unused:1012:513:sorins,U-JIRA\sorins,S-1-5-21-1179867521-3364476509-4149538525-1012:/home/sorins:/bin/bash
mkpasswd (87): [1212] The format of the specified domain name is invalid.

I tried even this option:

$ mkpasswd -l /etc/passwd
mkpasswd (374): [123] The filename, directory name, or volume label syntax is in                                                               correct.
  • JIRA is the computer name and sorins is a Local Administrator
  • This machine is part of domain

Best Answer

I think you want

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

i.e. redirect output to /etc/passwd

Related Topic