Quote:
Originally Posted by grpprod
Hello,
I was wondering if anyone has created a script (or can provide me with some guidelines/resources) to do the following:
1. Display the date in which a user account expires.
|
chage -l <username>
Quote:
Originally Posted by grpprod
2. Send an email to all users that their account is about to expire.
|
using something like (untested):
Code:
for i in `awk -F: '{print $1}' /etc/passwd`; do
done
combined with the chage above and some date manipulation
should get you the alerts :)
Quote:
Originally Posted by grpprod
3. Automatically remove expired accounts.
|
That's a BAD idea. I'd suggest that you use a similar
method to the above and then notify the admin. Just think
about it - if people have shell accounts, and store data
(that may in some instance be of importance to the company)
you don't want to automatically delete it just because the
author is gone.
Cheers,
Tink