Hi Ted,

Thanks for the info , Ok, at least I now know I was on the right lines.  I
just had a quick read through the adduser script and it seems to me that
there are no routines in there to deal with upwexpire , for instance I
guess it would need to take the input from adduser.conf (in my case "60d")
and convert this to a Unix epoch timestamp and write this into field 6 of
the password file.

wonder if this ever worked ?, Anyone ?

Thanks daz


On 9 June 2017 at 17:50, Ted Unangst <t...@tedunangst.com> wrote:

> Darren Marshall wrote:
> > Hi guys,
> >
> > I'm trying to create a policy whereby a user added to an OpenBSD 6.0
> system
> > automatically gets their password expiry set to 60 days.
> >
> > I did think that this could be accomplished by adding upwexpire="60d" to
> > /etc/adduser.conf but subsequent adding of a test user using adduser
> > doesn't inherit this setting , field 6 of their passwd entry is set to 0.
> >
> > Anyone got any idea how to achieve this?
>
> From adduser:
>
>             # obscure perl bug
>             $new_entry = "$name\:" . "$cryptpwd" .
>                 "\:$u_id\:$g_id\:$log_cl:0:0:$fullname:$home/$name:$sh";
>
> I will leave it to the ancient wizards to tell us more about the obscure
> perl
> bug, but it's easy to see the hardcoded 0:0 for change and expiry.
>

Reply via email to