Sponsored Content
Full Discussion: Check invalid user account
Top Forums Shell Programming and Scripting Check invalid user account Post 302150630 by Yogesh Sawant on Wednesday 12th of December 2007 03:08:21 AM
Old 12-12-2007
here's something to start with (using Perl):
Code:
#!/usr/bin/perl
# check_user_account.pl
use strict;
while (<>) {
        chomp;
        my @line = split /:/, ;
        print "home directory is not defined for user $line[0]\n"  unless ($line[5]);
        print "shell is not defined for user $line[0]\n"           unless ($line[6]);
}

run this script as:
Code:
perl check_user_account.pl /etc/passwd

 

9 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

user account

hi how to disable the useraccount in aix (should not remove). (1 Reply)
Discussion started by: chomca
1 Replies

2. AIX

AIX; Auto clearing of 'too many invalid login attempts by user'

Does anyone have a good script / cron job that handles this? I have looked in smit and see it is clearing this count with: chsec -f /etc/security/lastlog -a "unsuccessful_login_count=0" -s '{userid}' However when I looked around to find ways to automate this I have not found an easy... (0 Replies)
Discussion started by: Keith Johnson
0 Replies

3. 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

4. Solaris

id: invalid user name

Hello, We run solaris 8 with nis+, when I do niscat, I can see the user's information, but when I do id from the domain it is saying invalid user. What may be the problem? id: invalid user name: "abyu789" (1 Reply)
Discussion started by: mokkan
1 Replies

5. Solaris

Help me create new user account

I want create user. That user should be login to any server without asking password. How? tell me in detail. :wall: (3 Replies)
Discussion started by: Navkreddy
3 Replies

6. AIX

Successful user login, yet system claims invalid info

I have four AIX 6.1.7.4 systems freshly built and ready for our DBAs to do their work. Of the three one runs into an odd issue while logging in as himself, using Putty with ssh protocols. He logs in successfully, but also gets the following error message: : 3004-300 You entered an invalid login... (2 Replies)
Discussion started by: Mike Brendan
2 Replies

7. HP-UX

User account

I need to check actual date a user was disabled on my HP-UX server. Audit is claiming the user account was active during the last audit exercise. (7 Replies)
Discussion started by: cyriac_N
7 Replies

8. Red Hat

Failed password for invalid user

Dear All , I have created a user named X and gave sudo permissions for it , So that it can access some commands as root. This particular user can login to the server using SSH login through putty any where with in the network. But there is some issue , when the same user is trying from... (4 Replies)
Discussion started by: jegaraman
4 Replies

9. UNIX for Advanced & Expert Users

Crontab invalid account

Need assistance in crontab issue . Issue is user account getting error "Warning - Invalid account: 'cyborg' not allowed to execute cronjobs" on Solaris 11 Couple of steps I tried 1. Added user to /etc/cron.d/cron.allow 2. Checked if the account is locked *LK* . It is not locked 3. No log... (2 Replies)
Discussion started by: ajayram_arya
2 Replies
Locale::Codes::LangFam(3pm)				 Perl Programmers Reference Guide			       Locale::Codes::LangFam(3pm)

NAME
Locale::Codes::LangFam - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangFam; $lext = code2langfam('apa'); # $lext gets 'Apache languages' $code = langfam2code('Apache languages'); # $code gets 'apa' @codes = all_langfam_codes(); @names = all_langfam_names(); DESCRIPTION
The "Locale::Codes::LangFam" module provides access to standard codes used for identifying language families, such as those as defined in ISO 639-5. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 639-5 language family codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language families. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langfam('apa','alpha'); $lext = code2langfam('apa',LOCALE_LANGFAM_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from ISO 639-5 such as 'apa' for Apache languages. This is the default code set. ROUTINES
code2langfam ( CODE [,CODESET] ) langfam2code ( NAME [,CODESET] ) langfam_code2code ( CODE ,CODESET ,CODESET2 ) all_langfam_codes ( [CODESET] ) all_langfam_names ( [CODESET] ) Locale::Codes::LangFam::rename_langfam ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangFam::add_langfam ( CODE ,NAME [,CODESET] ) Locale::Codes::LangFam::delete_langfam ( CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_alias ( NAME ,NEW_NAME ) Locale::Codes::LangFam::delete_langfam_alias ( NAME ) Locale::Codes::LangFam::rename_langfam_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::delete_langfam_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.loc.gov/standards/iso639-5/id.php ISO 639-5 . AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 Locale::Codes::LangFam(3pm)
All times are GMT -4. The time now is 01:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy