Solved

Script that checks login time

Posted on 1998-02-19
6
250 Views
Last Modified: 2013-12-23
I need help finishing a script that checks login time.  I am running AIX.  I think I can add it to the "auth_method" entry in the /etc/security/login.cfg.  The part I have written follows.  Any help would be appriciated.


****************************************************************
/usr/bin/check_login_time
****************************************************************
#!/bin/ksh      * or other shell

USER=$1
If [USER eq "root"]
  exit 0
fi

if [USER eq "eod"]
  exit 0
fi

if [ ** check the time ** -lt 4:00]
  if [** check the time ** -gt 22:59]
    echo "You may not login between 11:00 PM and 4:00 AM due to End of Day Processing.  Please try again later..."
    exit 1
  fi
fi
exit 0

**************************************************************

Thanks for your help,
Rob
0
Comment
Question by:unitymtg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 1583162
if [ `date +%H` -lt 4 ] || [ `date +%H` -ge 23 ] ;then
  echo "You may not login between 11:00 PM and 4:00 AM due to End of Day Processing. Please try again later..."
fi

0
 

Author Comment

by:unitymtg
ID: 1583163
I will try to put this in place tonight.  If you will submit an answer, I will give you the points if it works.

Thanks,
Rob
0
 
LVL 84

Expert Comment

by:ozo
ID: 1583164
So did it work for you?  If not, what problems did you have?
0
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 

Author Comment

by:unitymtg
ID: 1583165
Made a couple of mods to make it more flexible, but the formatting did the trick.  Thanks for the help.

Rob
0
 
LVL 84

Accepted Solution

by:
ozo earned 100 total points
ID: 1583166
I take it you're happy with the answer then?
0
 

Author Comment

by:unitymtg
ID: 1583167
Thank you very much for the help.

Rob
0

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question