1827452 Members
4538 Online
109965 Solutions
New Discussion

Re: Mail

 
Elizangela Fernandes
Occasional Advisor

Mail

Hi,

I need to know how can I send a mail when the user password expire?

The password expires after 60 days and I change the password before this period.

Thank`s

Elizangela
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Mail

mail via port 25, smtp, does not by default require a login.

If your sendmail daemon is running and the server is configured to relay mail from the source IP address (the pc or server sending the mail) then the mail will go out regardless of whether the user account is expired or not.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Elizangela Fernandes
Occasional Advisor

Re: Mail

Sorry,

I will explain better.

I have many users that expires after 90 days.

My /etc/shadow:

Fernae1::12835:0:90:3:0::

so, I need to change the Fernae1`s password before exceed the 90 days, becouse if password expires the user couldn`t logon in the application.

My /var/log/messages

Account Fernae1 was disabled

My question is:

How can I configure my Operation System for alert me that the password is near to expire?

Thank`s
Steven E. Protter
Exalted Contributor

Re: Mail

You need to run a report parsing the data in the /etc/shadow.

You can use awk for field separation. awk -F:

I'm staring at the /etc/shadow file and not seeing how to turn that data into something usable.

perl -MPOSIX -e 'print POSIX::strftime("%m%d%Y", localtime(time - 86400));'

This is how its done in HP-UX.

Untested, but it may provide some insight. Also, this may have been done by others, so consider doing a search of itrc forums.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com