Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Aug 2017 20:06:11 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 221613] pw expire_days have a bug
Message-ID:  <bug-221613-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221613-8>