Solved

Script that checks login time

Posted on 1998-02-19
6
247 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
  • 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DHCP Server 14 85
nexus filter logs 3 43
Cisco Policy based routing 2 39
Guest Wireless in a Business Environment 6 30
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

776 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