Skip to content

Authentication - remove rc.expireaccounts (for being redundant)  #8037

Closed
@AdSchellevis

Description

@AdSchellevis

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

On periodic intervals a script rc.expireaccounts is called on our end via cron:

$jobs[]['autocron'] = array('/usr/local/etc/rc.expireaccounts', '4');

But in reality, it doesn't matter if the "disabled" flag is toggled as authentication is responsible for implementing the feature properly anyway:

!empty($userObject->expires)
&& strtotime("-1 day") > strtotime(date("m/d/Y", strtotime((string)$userObject->expires)))

To Reproduce

Just set a date (yesterday) and witness the account being locked without the cron job having executed yet.

Expected behavior

Not running a cron each day.

Describe alternatives you considered

Leaving it as is.

Screenshots

If applicable, add screenshots to help explain your problem.

Relevant log files

If applicable, information from log files supporting your claim.

Additional context

https://github.com/opnsense/core/blob/d3c1dd827b3dff49ee4884582106357e49330e2c/src/etc/rc.expireaccounts

Environment

Software version used and hardware type if relevant, e.g.:

OPNsense 24.7.7 (amd64).

Metadata

Metadata

Assignees

Labels

cleanupLow impact changes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions