pw -V /newetc adduser -D -w random: ... open("/newetc/pw.conf",O_RDONLY,0666) ERR#2 'No such file or directory' openat(AT_FDCWD,"/etc/pw.conf",O_RDWR|O_EXLOCK|O_CREAT|O_TRUNC,0644) = 4 (0x4) ... write(4,"#\n# pw.conf - user/group config"...,1367) = 1367 (0x557) close(4) = 0 (0x0) ...
A commit references this bug: Author: yuripv Date: Mon Oct 15 20:11:54 UTC 2018 New revision: 339369 URL: https://svnweb.freebsd.org/changeset/base/339369 Log: pw: respect path specified using -V when writing pw.conf, and -C is not explicitly specified. -V path is already used to determine which file to read default values from, so it's only logical to write them to the same file. PR: 231653 Reviewed by: eugen, bapt Approved by: re (gjb), kib (mentor) Differential Revision: https://reviews.freebsd.org/D17566 Changes: head/usr.sbin/pw/pw.h head/usr.sbin/pw/pw_conf.c head/usr.sbin/pw/pw_utils.c