Date: Sun, 5 Nov 2017 19:09:14 +0700 From: Victor Sudakov <sudakov+freebsd@sibptus.tomsk.ru> To: Yuri Pankov <yuripv@gmx.com> Cc: freebsd-hackers@freebsd.org Subject: Re: "pw useradd -D -e" writes bogus expire_days value into pw.conf Message-ID: <20171105120914.GA38007@admin.sibptus.transneft.ru> In-Reply-To: <497adca8-9e9a-fa99-34cb-6073cd433d01@gmx.com> References: <20171105033222.GA34641@admin.sibptus.transneft.ru> <497adca8-9e9a-fa99-34cb-6073cd433d01@gmx.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Yuri Pankov wrote: > On Sun, 5 Nov 2017 10:32:22 +0700, Victor Sudakov wrote: > > Dear Colleagues, > > > > Could anyone please reproduce this bug, especially on an 11.x and 12.x > > branches? Or is it just me? > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223431 > > Yes, it's the same on -CURRENT, but as the man page says, argument to -e > must be numeric in presence of -D, so most likely it just needs an > additional check. Hmm, even with a numeric argument it sets the expiry date incorrectly in newly created accounts, see the "Expire" line below: root@gw:~ # pw useradd -D -e 365 root@gw:~ # grep expire_days /etc/pw.conf expire_days = 365 root@gw:~ # root@gw:~ # pw useradd sobaka Password for 'sobaka' is: rcv8n2PJVP9dt root@gw:~ # root@gw:~ # chsh sobaka Changing user information for sobaka. Login: sobaka Password: $6$KwbJbuUKt03pocQG$nC5mirikOyzF1oFbZacRpn2GXBT1scOBvvtJ8Jfsyw7YPpsR0hW8wDSwLK9uuzAXFNt7aTcFgylweMTXtx1Np. Uid [#]: 1873 Gid [# or name]: 1000 Change [month day year]: Expire [month day year]: January 1, 1970 Class: russian Home directory: /home/sobaka Shell: /bin/tcsh Full Name: User & Office Location: Office Phone: Home Phone: Other information: -- Victor Sudakov, VAS4-RIPE, VAS47-RIPN AS43859
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171105120914.GA38007>