Deleting old users from database
Posted janvier 21st, 2008 by hector
To have a more accurate users' information, the delete_old_users.php script will delete users not seen in the central directory for more than 'delete_users_threshold' days that have no systems assigned. If systems are assigned, send a warning that they need to be reassigned to someone else.
In order to install this feature, you first need to add its configuration variable in the config table.
INSERT INTO config SET type='integer', name='delete_users_threshold', value='365', comment='Delete users not seen in the central directory for more than XX days';
Adjust the value according to your needs. This example is meant to delete users which haven't been seen in the central directory for one year.
Add the following entry in crontab
#Delete old users 0 1 * * 1 /opt/nac/bin/delete_old_users.php
This will cause this scrpt to run once a week (Monday at 1:00 AM).
If there are users to be deleted, you'll receive an e-mail summarizing the deleted users. or information of systems assigned to those users, in order to be assigned to someone else.
- Version imprimable
- Vous devez vous connecter pour poster des commentaires