I am trying to use pw useradd to add a user with root privileges, in a single command. So far I have done: [cmd=] pw useradd -n tom -s /bin/sh -m -g wheel -d /home/tom[/cmd] How do I assign a password now directly as a one liner?
I tried [cmd=]echo PASSWORD | pw user mod tom -H 0[/cmd] but that doesn't hash it. I tried echo-ing a salted string but $ cannot be escaped easily :-(
I tried [cmd=]echo PASSWORD | pw user mod tom -H 0[/cmd] but that doesn't hash it. I tried echo-ing a salted string but $ cannot be escaped easily :-(