04-24-2012
Linux drak 2.6.32-40-386 #87-Ubuntu SMP Mon Mar 5 23:03:22 UTC 2012 i686 GNU/Linux
I need to make a script which will list human users ( not computer ones ) from /etc/passwd and find out if their home directory is empty or not.
Last edited by methyl; 04-24-2012 at 09:56 AM..
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hey, got a few questions here for anyone who can help......
Command line to - display users using the system, but count them only once.
Command line to - use the lastcomm command to display how many times ive used grep in october.
Command line to - list all logged on users with at least 6... (3 Replies)
Discussion started by: xBuRnTx
3 Replies
2. AIX
Hello
I have a question
I have this users on my aix 5.3 box. This are a default users.
lp:*:11:11::/var/spool/lp:/bin/false
invscout:*:6:12::/var/adm/invscout:/usr/bin/ksh
snapp:*:200:13:snapp login user:/usr/sbin/snapp:/usr/sbin/snappd
ipsec:*:201:1::/etc/ipsec:/usr/bin/ksh... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies
3. Shell Programming and Scripting
Hi,
I want to code a script with perl. For this, I need some knowledge.
How can i use system user name(with group) and password in my login page?
I will be happy if you can help me (2 Replies)
Discussion started by: tahsinaltay
2 Replies
4. Shell Programming and Scripting
A Newbie here,
I am working on a script and am having problems with the else part of the script. I can't get the users who are not logged into the system to display on the screen with their username and the text "The user is not logged in". I am sure it is something simple and stupid, but I... (5 Replies)
Discussion started by: rchirico
5 Replies
5. UNIX for Advanced & Expert Users
All,
Preliminaries:
AIX 5.2
Tivoli Maestro 6.1 (9.2)
I am auditing an older AIX system. As it stands, I can login remotely to the system using the Maestro application's user account. This is BAD. The administrator claims that he cannot disable the remote login, because it will... (1 Reply)
Discussion started by: Thatto
1 Replies
6. Emergency UNIX and Linux Support
Is there a way to generate a list of users with name, user ID, and Security Group? It is urgent for audit purposes.
Please help. (5 Replies)
Discussion started by: ggayathri
5 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I want to create a file called Allusers that contains the list of
currently logged on users and the total number... (2 Replies)
Discussion started by: ahm2008
2 Replies
8. UNIX for Dummies Questions & Answers
So I'm trying to write a single line command So I have to use last first in this command and I've figured out the format my professor wants it in, something like thislast | cut -d' ' -f1,15 | sort > check | uniq -c.... and I never can get it right, when I just last command I get something... (2 Replies)
Discussion started by: DoubleAlpha
2 Replies
9. Shell Programming and Scripting
Is there any command that can used in Linux that export usernames and their manager's name from AD using bash shell script?
I know this can be done using powershell but I need to use Linux for this procedure. (2 Replies)
Discussion started by: dellanicholson
2 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)