Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Script that checks login time

Posted on 1998-02-19
6
Medium Priority
?
253 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
Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

 

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 400 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

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

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

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Make the most of your online learning experience.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

650 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