07-25-2008
I am not getting you. /etc/shadow has password information.I need to generate list of users who has not logged on since last 90 days.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I would like to automatically logout from the system inactive users depending on their functions.
For example there are users that I would like to logout after 15 minutes of inactivity, but there are others that I would like to logout after 30 minutes of inactivity.
It's possible to do this??? (6 Replies)
Discussion started by: rrivas
6 Replies
2. Shell Programming and Scripting
I'm trying to execute a single shell command that will give me a sorted list of all the users currently logged into the system, displaying the users name as it appears in /etc/passwd.
I've tried
awk -F: '{print $1}' /etc/passwd | xargs finger -s | cut -c11-28 | uniq
This list whoever does... (7 Replies)
Discussion started by: kungfuice
7 Replies
3. UNIX for Dummies Questions & Answers
Is this possible?
Say I create an account today and in 90 days I want it to be turned off.
Is this sort of thing possible using the built in components of a Unix system?
(Using Solaris 9)
I see things about password expires, but what if the person changes his password on the 89th day,... (1 Reply)
Discussion started by: LordJezo
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Can I get a script to list out all the users, who has not logged on since last 90 days. Last command in not working due due to /var/adm/wtmpx is more than 2 GB.
Thanks in advance.
Regards,
Roni (10 Replies)
Discussion started by: manasranjanpand
10 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I'm trying to do a list of user that never connected to a couple of servers. I want to do a diff between the servers lists, and print out only the users that never has logged on each server. Here my first step :
SERVER01:
# finger `egrep -v -e "^\s*#" /etc/passwd | awk '{ print $1 }' |... (4 Replies)
Discussion started by: gogol_bordello
4 Replies
6. Programming
How can I get the list of logged in users in the system programmatically?
I can get the list with 'who' or 'users' commands but I need to get the list programmatically...
May someone help, please?
Thanks in advance. (2 Replies)
Discussion started by: xyzt
2 Replies
7. Shell Programming and Scripting
Hi,
How to find the users who did not login into a UNIX box (thru ssh/ftp or any other way) for last 90 days?
I think of using "finger" or "last" command to findout each user's last login and then find number of days between today and that day. Is there any other better way or anyone prepared... (1 Reply)
Discussion started by: reddyr
1 Replies
8. Shell Programming and Scripting
Hi everyone,
At work we were told to check the list of users of an application server and delete all those that have left the company or don't need access to the application anymore. Here's what I came up with. Would you be as kind as to tell me your opinion and whether there is a faster / easier... (4 Replies)
Discussion started by: gacanepa
4 Replies
9. Shell Programming and Scripting
Hi Guys!
I am sure that this question might appeared previously, but I still don't know how to show a list of logged out users. Please help with this!
Thanks in advance:) (5 Replies)
Discussion started by: saloliubliu
5 Replies
10. Shell Programming and Scripting
Dear All,
I need your help in finding out users not logged in to linux system for more than 90 days. I found a script from our forum i am getting error while using that.
from the code i have debugged line by line to see where i am getting the problem. i found out the below line i am getting... (5 Replies)
Discussion started by: Sachinlinux
5 Replies
logins(1M) logins(1M)
NAME
logins - display system and user login data
SYNOPSIS
groups] logins]
DESCRIPTION
displays data concerning system and user logins. The format and content of the output is controlled by command options and may include:
system or user login, user ID number, comment field value (for example, user name, location), primary group name, primary group ID, supple-
mentary group names, supplementary group IDs, home directory, login shell, user security level, user audit events, and password aging
parameters. The default data is: login, user ID, primary group name, primary group ID, and comment field value. Output is sorted by user
ID, with user logins following system logins. The default output consists of login, user ID, primary group, primary group ID and comment
field formatted into columns.
The following options are available to this command:
Display two account expiration fields. The fields show how long the
account can be unused (in days) before it becomes inactive and the date the account will expire.
Display logins with duplicate UIDs.
Show multiple group membership data.
Display with alternate format of one line of colon separated fields.
Display logins with no passwords
Display all system logins
Sort output by login rather than UID.
Display all user logins.
Display extended information about selected users. This extended
information includes home directory, login shell and password aging data, each on its own line. Password information consists of pass-
word status (PS for valid password, LK for locked and NP for no password) and, if a password is present, date of last change, required
number of days between changes, and number of days allowed between changes. In the case of non-trusted systems, the date of last
change will be the latest Thursday since the change.
Display all users belonging to
groups, sorted by login. A comma separated list specifies multiple groups.
Display the requested
logins. A comma separated list specifies multiple logins.
Specify a switch used to classify NIS
or local users. With the option, only users belonging to the specified repository are displayed.
Multiple options may be used. Any login matching any of the criteria will be displayed. A login will be displayed only once, even if it
meets multiple criteria.
EXAMPLES
List all logins in default format.
List all logins that have no password or have a duplicate UID in default
format.
List all system logins in the alternate format.
List all local users of the system.
List all the NIS users of the system.
WARNINGS
HP-UX 11i Version 3 is the last release to support trusted systems functionality.
FILES
HP-UX password file.
HP-UX group file.
SEE ALSO
listusers(1), passwd(1), group(4), passwd(4), prpwd(4), shadow(4).
STANDARDS CONFORMANCE
logins(1M)