10-23-2015
Your suggestions could be set out as:-
- Compare today's /etc/passwd to yesterday (sort first for ease)
- Save current /etc/passwd to use tomorrow
You can then look for password expiry based on the content of
/etc/security/password It's a little awkward because:-
- The Last password change time is stored in seconds from 1/1/1970
- The expiry will be in weeks, either per user or in the default stanza
Using
/etc/passwd as a driver, you can read one stanza from
/etc/security/passwd with
grep -Ep "^$userid:" /etc/security/passwd although you then have to consider the points above to decide if the password is about to expire, depending also how you define 'about to expire'
Does this give you something to work with?
Robin
10 More Discussions You Might Find Interesting
1. Programming
How do I write a C program that will watch a directory for file creation/deletion? Maybe it would receive a signal when someone creates a file?
thanks,
Siegfried (5 Replies)
Discussion started by: siegfried
5 Replies
2. Solaris
Hi all,
I want to create one user with full permissions to one directory called /opt/tivoli/tsm/client/ba/bin.
Name for the user Tivoli
Thanks & Regards
Babu (7 Replies)
Discussion started by: lbreddy
7 Replies
3. Programming
Hi,
I'm writing a monitor program that can be notified once a process makes an execve system call and then stop that process for examining before it starts to run the new code. I know I can ptrace a process to achieve this, but I do not want to ptrace every process in the system. Is it possible?... (1 Reply)
Discussion started by: aaron.lwe
1 Replies
4. Solaris
i am trying to create a user on solaris 10. it is not taking user name with more than ten characters. which file i need to edit to do this setting. (4 Replies)
Discussion started by: raynu.sharma
4 Replies
5. UNIX for Dummies Questions & Answers
Hello,
Please help about writing a process that will be automatically notified by file creation in a predefined directory. Some code will appreciated.
Thanks for all. (4 Replies)
Discussion started by: echchatbi
4 Replies
6. Red Hat
Hi
Thanks in advance.
How to create a user without useradd command ?? (1 Reply)
Discussion started by: krish4linux
1 Replies
7. UNIX for Advanced & Expert Users
Hi,
I am using OpenLDAP for authenticating my postfix mail server. Now i have to clean up some resigned users from the LDAP directory. I have the list of common names (CN) with me, how can i delete the LDAP users form with that list.
Regards,
Hima Kiran (2 Replies)
Discussion started by: ghimakiran
2 Replies
8. UNIX and Linux Applications
Dear Concern,
Is there any built in tool/application/command available for Linux user account expiration notification purpose.
With Best Regards,
Md. Abdullah-Al Kauser (2 Replies)
Discussion started by: makauser
2 Replies
9. Shell Programming and Scripting
Can someone help me with a shell script that will send an email to a set of email ids when a user id is created or deleted on AIX system.
Also, if the script can let the admin know when a particular user id's password will expire. (2 Replies)
Discussion started by: ggayathri
2 Replies
10. UNIX for Dummies Questions & Answers
Dear All,
It would be really nice, if you could help me to write a script for deletion of list of user( more than 15000 users) stored in a file and sorted by email address( i need deletion of only a particular type of mail address).
Is the any script to write and take the file as input and... (3 Replies)
Discussion started by: Chand
3 Replies
LEARN ABOUT SUSE
log::dispatch::email
Log::Dispatch::Email(3) User Contributed Perl Documentation Log::Dispatch::Email(3)
NAME
Log::Dispatch::Email - Base class for objects that send log messages via email
SYNOPSIS
package Log::Dispatch::Email::MySender
use Log::Dispatch::Email;
use base qw( Log::Dispatch::Email );
sub send_email
{
my $self = shift;
my %p = @_;
# Send email somehow. Message is in $p{message}
}
DESCRIPTION
This module should be used as a base class to implement Log::Dispatch::* objects that send their log messages via email. Implementing a
subclass simply requires the code shown in the SYNOPSIS with a real implementation of the "send_email()" method.
CONSTRUCTOR
The constructor takes the following parameters in addition to the standard parameters documented in Log::Dispatch::Output:
o subject ($)
The subject of the email messages which are sent. Defaults to "$0: log email"
o to ($ or @)
Either a string or a list reference of strings containing email addresses. Required.
o from ($)
A string containing an email address. This is optional and may not work with all mail sending methods.
o buffered (0 or 1)
This determines whether the object sends one email per message it is given or whether it stores them up and sends them all at once.
The default is to buffer messages.
METHODS
o send_email(%p)
This is the method that must be subclassed. For now the only parameter in the hash is 'message'.
o flush
If the object is buffered, then this method will call the "send_email()" method to send the contents of the buffer and then clear the
buffer.
o DESTROY
On destruction, the object will call "flush()" to send any pending email.
AUTHOR
Dave Rolsky, <autarch@urth.org>
perl v5.12.1 2009-09-22 Log::Dispatch::Email(3)