?
Solved

Script that checks login time

Posted on 1998-02-19
6
Medium Priority
?
252 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
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 

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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

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.
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

765 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