Sponsored Content
Top Forums Shell Programming and Scripting Specified log in time for users Post 302657317 by balajesuri on Sunday 17th of June 2012 07:18:05 AM
Old 06-17-2012
Quote:
Originally Posted by muffle
I have this task : Check the logintime.txt every minute to only allow user to log in at the specified time.

Any better idea to do this? Because my solution don't do the 'check file every minute' thing. And I don't understand why we need to do that thing.
Code:
while read USER TIME_START TIME_STOP # Get rid of echo and awk by using shell's IFS
do
at $TIME_START << EOF
passwd -l $USER
EOF
at $TIME_STOP << WTH
passwd -u $USER
WTH
sleep 60 # This should let a minute pass
done < logintime.txt

Quote:
Originally Posted by muffle
And I don't understand why we need to do that thing.
Well, isn't that your requirement?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Finding last time users logged in

I would like to find out the last time all users have logged in or out. I tried the last command, but it could not find the wtmp file in /var/adm (I searched in othe directories also). This is an AIX rs6000 4.2.1 system. We are moving our applications from this system to an AIX 5.2 system and I... (11 Replies)
Discussion started by: jyoung
11 Replies

2. UNIX for Dummies Questions & Answers

log users real time

hi.... how i can configurator a log file on real time....on unix solaris.... thanks a lot.... Best Regards... (3 Replies)
Discussion started by: chanfle
3 Replies

3. UNIX for Dummies Questions & Answers

last login date and time for all users

I need a command that will list all the users and their last login date & time. I was trying the last command and the who command, but can't get exactly what I need. I just need the output to be user name and last login date . Thanks for your help! (3 Replies)
Discussion started by: igidttam
3 Replies

4. Programming

how can get users list and their login time?

i'm sorry if yesterday i posted this thread in unix for dummies forums, :D i am a newbie in C programming i want to get active users list and their login time... i have search and learn about passwd and utmp, but i only can get user list without their login time... do you have an idea... (2 Replies)
Discussion started by: alif
2 Replies

5. UNIX for Advanced & Expert Users

same file being opened by two users at a time

I want to avoid a situation where because two users simultaneously open a file and modify and save, leaving the original file in mess. Is there a way in UNIX to warn a user if that particular file is already being used by another user. Thanks in advance (3 Replies)
Discussion started by: paresh n doshi
3 Replies

6. UNIX for Dummies Questions & Answers

Date, time, users

i need to find out following ways to show out put in a shell script when the user selects that option in a case statement. I have the case statement already started just need to find out how to read the following: current date and time (should it be read date)? users logged in (should it be... (4 Replies)
Discussion started by: vthokiefan
4 Replies

7. Shell Programming and Scripting

Monitoring a users log in time?

how do i start with this guys? Sample run: $ LOGTIME it2015678 <enter> User it2015678 is CRUZ Tommy H And has logged on to the system for: 8 hours 12 minutes from the time this script was run. (1 Reply)
Discussion started by: skypigeon
1 Replies

8. Shell Programming and Scripting

id -a multiple users at one time?

Hi Expert, How do I want to id -a multiple users at one time? * i know that this does not work, Thanks (4 Replies)
Discussion started by: regmaster
4 Replies

9. Homework & Coursework Questions

Sort current logged in users by log in time (supposedly to be very easy but I'm missing something)

1. The problem statement, all variables and given/known data: Show all users who are currently logged in, sorted from earliest to latest log in time. The log in time includes the month, day, and time. 2. Relevant commands, code, scripts, algorithms: finger, who, sort, pipe, head, tail, ... (8 Replies)
Discussion started by: vtmd
8 Replies

10. Shell Programming and Scripting

Problems in analysing SSH LOG users & time

Attached is the log file that I have generated through the following script: last | head -2 |sed '2q;d' |awk '{ print $1"\t"$2"\t"$3"\t\t"$4"\t"$5"\t"$6"\t"$7"\t"$8"\t" $9"\t"$10"\t"$11}'>>/var/log/logadmin/logtest.txt But now I'm unable to run the following operations on it: 1. Count... (1 Reply)
Discussion started by: Lionking93
1 Replies
BPUTA(1)							 CFDP executables							  BPUTA(1)

NAME
bputa - BP-based CFDP UT-layer adapter SYNOPSIS
bputa DESCRIPTION
bputa is a background "daemon" task that sends and receives CFDP PDUs encapsulated in DTN bundles. The task is spawned automatically by cfdpadmin in response to the 's' command that starts operation of the CFDP protocol; the text of the command that is used to spawn the task must be provided as a parameter to the 's' command. The link service input task is terminated by cfdpadmin in response to an 'x' (STOP) command. EXIT STATUS
0 bputa terminated normally, for reasons noted in the ion.log file. If this termination was not commanded, investigate and solve the problem identified in the log file and use cfdpadmin to restart bputa. 1 bputa terminated abnormally, for reasons noted in the ion.log file. Investigate and solve the problem identified in the log file, then use cfdpadmin to restart bputa. FILES
No configuration files are needed. ENVIRONMENT
No environment variables apply. DIAGNOSTICS
The following diagnostics may be issued to the ion.log log file: CFDP can't attach to BP. bpadmin has not yet initialized BP protocol operations. CFDP can't open own endpoint. Most likely another bputa task is already running. Use cfdpadmin to stop CFDP and restart. CFDP can't get Bundle Protocol SAP. Most likely a BP configuration problem. Use bpadmin to stop BP and restart. bputa can't attach to CFDP. cfdpadmin has not yet initialized CFDP protocol operations. bputa can't dequeue outbound CFDP PDU; terminating. Possible system error. Check ion.log for additional diagnostic messages. bputa can't send PDU in bundle; terminating. Possible system error. Check ion.log for additional diagnostic messages. bputa can't track PDU; terminating. Possible system error. Check ion.log for additional diagnostic messages. bputa bundle reception failed. Possible system error; reception thread terminates. Check ion.log for additional diagnostic messages. bputa can't receive bundle ADU. Possible system error; reception thread terminates. Check ion.log for additional diagnostic messages. bputa can't handle bundle delivery. Possible system error; reception thread terminates. Check ion.log for additional diagnostic messages. bputa can't handle inbound PDU. Possible system error; reception thread terminates. Check ion.log for additional diagnostic messages. BUGS
Report bugs to <ion-bugs@korgano.eecs.ohiou.edu> SEE ALSO
cfdpadmin(1), bpadmin(1) perl v5.14.2 2012-05-25 BPUTA(1)
All times are GMT -4. The time now is 08:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy