how to write a shellscript to send a mail alert to the website user based on license expiration time


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to write a shellscript to send a mail alert to the website user based on license expiration time
# 1  
Old 09-03-2010
how to write a shellscript to send a mail alert to the website user based on license expiration time

hi,

i am very much new to shell scripting i have a requirement that i have to develop a License Renewal Alert system
that has to give a alert mail to the users before 30days of user account expiration, by checking expiration date of the user with the data base, this system will run as cron job

can any one give me suggestions how to do it, waiting for your valuable suggetions
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Shell script to send mail alert

Hi I have below shell script to send mail alert , however I want to add more functionality in this script and that is , script should only check that file between 9 am to 5pm , and if there is no activity in this time 9 am to 5 pm for 2hours then it should give me mail alert, please help... (2 Replies)
Discussion started by: scazed
2 Replies

2. Shell Programming and Scripting

Shell script to send mail alert

HI Guys, I am writing one shell script to send the mail alert to some email id's if the file not modified in last 10 mins but its not working, I believe MTIME is null string is wrong . can you please assist me on this. script :- filename="abc.txt" echo "Filename is $filename"... (1 Reply)
Discussion started by: abhigrkist
1 Replies

3. UNIX for Beginners Questions & Answers

How to write a UNIX script to send a mail to the respective individual users about their groups?

Hi Team, I got a requirement to send a mail to the individual users of a unix server about their respective groups. can some one help me to provide the script as I am unable to write that. I tried with below lines but I come out with errors. cat /etc/passwd | awk -F':' '{ print $1}' |... (6 Replies)
Discussion started by: harshabag
6 Replies

4. Shell Programming and Scripting

How to write this script:- check output word and send a mail?

Hi Guys, I am not Good at scripting. I need to write a script such that if output of command shows the particular word in output then send mail to abc@compay.com -bash-3.2$ ps -ef | grep bpbkar root 6040 1 0 13:05:19 ? 0:00 bpbkar -r 2678400 -ru root -dt 47395 -to 0... (20 Replies)
Discussion started by: manalisharmabe
20 Replies

5. Shell Programming and Scripting

Send mail based on a group

Hello Gurus, I have a question. I have a file which has 2 columns and is tab separated and looks like below: FIELD1 FIELD2 Manual m456@hotmail.com Execution din098@gmail.com Artistic m456@hotmail.com Graphic din098@gmail.com FIELD2 values will have always either of the 2 above... (8 Replies)
Discussion started by: Max499
8 Replies

6. Shell Programming and Scripting

Poll for a file. If not present...Send a alert mail

Dear Experts, I have a requirement where a 3rd party system places a file in my folder.I am running on HP UNIX. I would like to have a unix script which will check for the existence of the file. If yes OK. if the file is not placed then it has to send a mail to couple of emails ids saying that... (3 Replies)
Discussion started by: phani333
3 Replies

7. Shell Programming and Scripting

How to automatically send a mail alert if the script errors out

I have a script like this, which calls other scripts from that script: #!/usr/ksh moveFiles.sh extract.sh readfile=/home/sample.txt cat $readfile | while read line do file= `echo $line|awk '{print $4}'` if ; then mv $file /home/temp_stage fi (4 Replies)
Discussion started by: ss3944
4 Replies

8. Shell Programming and Scripting

Write a script to send alert for some particular hours in a day

Hi All, I have a have a script which checks for some processes whether they are running or not and if they are not running then it send a mail specifying that the processes are not running. This particular script example abc.ksh is runs in a cron like this 0,5,10,15,20,25,30,35,40,45,50,55 * * *... (5 Replies)
Discussion started by: usha rao
5 Replies

9. Shell Programming and Scripting

How to use SSH to connect to Primary DB and send alert mail

Hi All, AIX 5.3 64 bit: I am using the below shell script the objective is: Objective: ======== Use SQL*Plus to query the MAX(SEQUENCE#) from both databases V$LOG_HISTORY view. If the STANDBY appears to be falling behind,then send alert mail through the below shell script: How... (0 Replies)
Discussion started by: a1_win
0 Replies

10. Shell Programming and Scripting

need to send alert mail

hi, i need to monitor a cron job that runs every 5 mins. if this cron job does not process the request for more than 6 hrs, an alert mail should be sent. how do i achieve this?? (1 Reply)
Discussion started by: smurala
1 Replies
Login or Register to Ask a Question
SHADOW(5)						   File Formats and Conversions 						 SHADOW(5)

NAME
shadow - shadowed password file DESCRIPTION
shadow is a file which contains the password information for the system's accounts and optional aging information. This file must not be readable by regular users if password security is to be maintained. Each line of this file contains 9 fields, separated by colons (":"), in the following order: login name It must be a valid account name, which exist on the system. encrypted password Refer to crypt(3) for details on how this string is interpreted. If the password field contains some string that is not a valid result of crypt(3), for instance ! or *, the user will not be able to use a unix password to log in (but the user may log in the system by other means). This field may be empty, in which case no passwords are required to authenticate as the specified login name. However, some applications which read the /etc/shadow file may decide not to permit any access at all if the password field is empty. A password field which starts with an exclamation mark means that the password is locked. The remaining characters on the line represent the password field before the password was locked. date of last password change The date of the last password change, expressed as the number of days since Jan 1, 1970. The value 0 has a special meaning, which is that the user should change her password the next time she will log in the system. An empty field means that password aging features are disabled. minimum password age The minimum password age is the number of days the user will have to wait before she will be allowed to change her password again. An empty field and value 0 mean that there are no minimum password age. maximum password age The maximum password age is the number of days after which the user will have to change her password. After this number of days is elapsed, the password may still be valid. The user should be asked to change her password the next time she will log in. An empty field means that there are no maximum password age, no password warning period, and no password inactivity period (see below). If the maximum password age is lower than the minimum password age, the user cannot change her password. password warning period The number of days before a password is going to expire (see the maximum password age above) during which the user should be warned. An empty field and value 0 mean that there are no password warning period. password inactivity period The number of days after a password has expired (see the maximum password age above) during which the password should still be accepted (and the user should update her password during the next login). After expiration of the password and this expiration period is elapsed, no login is possible using the current user's password. The user should contact her administrator. An empty field means that there are no enforcement of an inactivity period. account expiration date The date of expiration of the account, expressed as the number of days since Jan 1, 1970. Note that an account expiration differs from a password expiration. In case of an account expiration, the user shall not be allowed to login. In case of a password expiration, the user is not allowed to login using her password. An empty field means that the account will never expire. The value 0 should not be used as it is interpreted as either an account with no expiration, or as an expiration on Jan 1, 1970. reserved field This field is reserved for future use. FILES
/etc/passwd User account information. /etc/shadow Secure user account information. /etc/shadow- Backup file for /etc/shadow. Note that this file is used by the tools of the shadow toolsuite, but not by all user and password management tools. SEE ALSO
chage(1), login(1), passwd(1), passwd(5), pwck(8), pwconv(8), pwunconv(8), su(1), sulogin(8). shadow-utils 4.5 01/25/2018 SHADOW(5)