From owner-freebsd-bugs@freebsd.org Fri Aug 18 20:06:11 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC926DD3409 for ; Fri, 18 Aug 2017 20:06:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBCAE7340E for ; Fri, 18 Aug 2017 20:06:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v7IK6BMB008510 for ; Fri, 18 Aug 2017 20:06:11 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 221613] pw expire_days have a bug Date: Fri, 18 Aug 2017 20:06:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 10.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: amontalban@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Aug 2017 20:06:11 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221613 Bug ID: 221613 Summary: pw expire_days have a bug Product: Base System Version: 10.3-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: amontalban@gmail.com Hey guys, I'm using the following /etc/pf.conf configuration: home /home homemode 027 defaultshell /usr/local/bin/bash defaultclass default password_days 60 According to [1] "expire_days days after which account expires" And: The expire_days and password_days are used to automatically calculate = the number of days from the date on which an account is created when the account will expire or the user will be forced to change the account's password. A value of `0' in either field will disable the correspondi= ng (account or password) expiration date. However what the password_days parameter does is to include that in the /etc/passwd: amontalban:*:1003:1006:default:60:0:Andres Montalban,None,None,None:/home/amontalban:/usr/local/bin/bash And according to [2] the expire parameter (60 in the above line) should be: The expire field is the number of seconds from the epoch, UTC, until t= he account expires. This field may be left empty to turn off the account aging feature; a value of zero is equivalent to leaving the field empt= y. So it's clearly a bug when pw generates the user as it should put the epoch time in that field. [1] https://www.freebsd.org/cgi/man.cgi?query=3Dpw.conf&sektion=3D5&n=3D1 [2] https://www.freebsd.org/cgi/man.cgi?query=3Dpasswd&apropos=3D0&sektion=3D5&= manpath=3DFreeBSD+10.3-RELEASE&arch=3Ddefault&format=3Dhtml --=20 You are receiving this mail because: You are the assignee for the bug.=