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