Sponsored Content
Top Forums UNIX for Advanced & Expert Users Finding user accounts not accessed for a specific number of days Post 302556036 by vbe on Friday 16th of September 2011 11:23:27 AM
Old 09-16-2011
Im a bit bit tired so I may say a load of crap...IMHO
rather than:
Code:
last -f /var/adm/wtmpx | grep user | tail -n-1

why not e.g
Code:
 $ finger -sw user|tail -1
 $ last user|head -1

But you could read in a loop all the lines of just the output of last till the date you want in a file, keep the first field (user name) make them uniq and use that to against user database
This User Gave Thanks to vbe For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

User Accounts

I have found a script to create user accounts. But there are a few lines i dont understand. Can someone help me with this? Here's the code: ###################################### while ; do ACCT=${USER_ACCT}${START} START=`expr $START + 1` START=`echo ${START} | awk... (3 Replies)
Discussion started by: Sensor
3 Replies

2. Shell Programming and Scripting

Counting Number of times a File is accessed

Hi, I need to count the number of times a script is accessed from within the script. Is it possible ? Example: I have a script called lo.sh and i execute the script for the first time, then the counter variable declared inside the lo.sh should increment by 1. For every execution the... (1 Reply)
Discussion started by: pathanjalireddy
1 Replies

3. Shell Programming and Scripting

Finding The Number Of Programs That A Given User Running On A TERMINAL

How To Find The Number Of Programs That A User Running ON A GIVEN TERMINAL (4 Replies)
Discussion started by: venkata.ganesh
4 Replies

4. UNIX for Dummies Questions & Answers

single user mode - user accounts passwords

hello ppl, someone must be able to help with this --> I have an old NCR tower 32 with an ADDS terminal running a unix version 020102 (Im not sure if thats correct but its unix for sure). I have no user names and no passwords and need to login to read a tape. Is there any way to do that? I hear... (3 Replies)
Discussion started by: orestis
3 Replies

5. UNIX for Dummies Questions & Answers

Difference between : Locked User Account & Disabled User Accounts in Linux ?

Thanks AVKlinux (3 Replies)
Discussion started by: avklinux
3 Replies

6. UNIX for Dummies Questions & Answers

Number of files accessed this week

I have looked around on the internet and still i am no wiser as to how to show the number of files in a directory that have been accessed this week and also that as a percentage. Any help would be much appreciated. (5 Replies)
Discussion started by: RAFC_99
5 Replies

7. Shell Programming and Scripting

Number of days between the current date and user defined date

I am trying to find out the number of days between the current date and user defined date. I took reference from here for the date2jd() function. Modified the function according to my requirement. But its not working properly. Original code from here is working fine. #!/bin/sh... (1 Reply)
Discussion started by: hiten.r.chauhan
1 Replies

8. Shell Programming and Scripting

getting timestamp of a file and if it was accessed today then finding a line in it

i have my files and the variables value extracted from db is taken as in1=slot0312 in2=best in3=it is :veryliong/fine as varibles.. i have a folder stuctures in my unix machine as : /2011/hand_sl0312/best/HOD/file1.txt /2011/hand_sl0312/happy/HOD/file1.txt... (1 Reply)
Discussion started by: rajniman
1 Replies

9. Shell Programming and Scripting

Finding AIX user accounts expired or locked

// AIX 6.1 In need of finding which AIX user accounts will be expired and are locked. I have placed the following parameters under /etc/security/user... (1 Reply)
Discussion started by: Daniel Gate
1 Replies
ftpshut(1)						      General Commands Manual							ftpshut(1)

NAME
ftpshut - create shutdown message file to shut down the ftp servers at a given time SYNOPSIS
time [ warning-message ... ] DESCRIPTION
The command provides an automated shutdown procedure that a superuser can use to notify ftp users when the ftp server is shutting down. This command will create a shutdown message file in the path specified by the 'shutdown' directive in the file in the real, anonymous and virtual user accounts. For guest accounts the system administrator must copy the message file created in the real user account to the guest accounts manually. The server will check this file regularly to see if the server is going to be shut down. This option causes the program to display copyright and version information, then terminate. This option is used as deny_offset. New FTP access is disabled 'min' minutes before shutdown. The default value of 'min' is 10 minutes. This value can be reset by the user. This option is used as disc_offset. All current FTP connections will be dropped 'min' minutes before shutdown. The default value of 'min' is 5 minutes. This value can be reset by the user. time time, is the time at which the ftp server will be shutdown. If is set to the word `now' the shutdown will be immedi- ate. time can also be set to a future time. Future time can be specified in one of the two formats: + number or HHMM. The first format brings the ftp servers down in number minutes. The second format brings the ftp servers down at the time of day indicated, using a 24-hour clock format. warning-message The warning-message is the message the server will flash to its clients on shut down. The user can use a message of his choice or use the 'macros' or 'magic cookies' that are available. The server will replace the macro with the specified text string. The warning-message will be formatted to be 75 characters long, including the length of any expanded macros ("magic cookies"). The default warning message is "System shutdown at %s". The following magic cook- ies are available: %s time system is going to shut down %r time new connections will be denied %d time current connections will be dropped %C current working directory %E the maintainer's email address as defined in ftpaccess %L local host name %M maximum allowed number of users in this class %N current number of users in this class %R remote host name %T local time (form Thu Nov 15 17:12:42 1990) %U username given at login time WARNINGS
You can kill the servers only between now and 23:59, if you use the absolute time for EXIT STATUS
returns: 0 successful 1 failure -1 the wrong parameter was passed to AUTHOR
was developed by the Washington University, St. Louis, Missouri. SEE ALSO
ftpaccess(4) ftpshut(1)
All times are GMT -4. The time now is 05:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy