01-30-2012
AIX 5.3 ksh Scripting
Hi,
I posted a request for sever OS types earlier, but got no response. In an attempt to at least have a starting point, I think scaling it to one OS is preferred. Once I see the gist of it I can modify to account for different cases.
I need a script that will go and check to see if an LDAP connection is open and functioning. Just want to check with one LDAP user account,. i.e. lsldap - a passwd <ldap_username>
Need to output this to a file, in list format, for all that pass and a different file for those that do not. Can anyone please assist? It would be much appreciated, my boss is a cool guy but he needs this from me today if possible. I have searched the forums and am coming up empty on this.
Thanks in advance for any help you can provide,
D
Last edited by tekster2; 01-30-2012 at 01:18 PM..
Reason: lsldap not ldldap lol
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Will a shell script written in shell for HP/UX run on Solaris? (1 Reply)
Discussion started by: dstaller
1 Replies
2. Shell Programming and Scripting
can someone pls help me with the script for a files coming from one system to a particular directory and i want to write a script to move those files to another directory on different system by renaming the files...
pls someone help me on this...
thanking in anticipation.... (1 Reply)
Discussion started by: thatiprashant
1 Replies
3. Shell Programming and Scripting
Hi I need to insert a page break into a file based on matching a phrase in the file. :confused: I am doing this with a ksh script on a Unix box.
Any help would be greatly appreciated.
Thanks (5 Replies)
Discussion started by: scrappycc
5 Replies
4. Shell Programming and Scripting
I have the file as below
server1 no dr aix 5300-05-03 9119-595 20-18888 yes ftp-eagle
server2 no dr aix 5300-05-03 9119-595 20-18888 yes ftp-eagle
server3 yes dr aix 5300-05-03 9119-595 20-18888 yes ftp-eagle
server4 ... (1 Reply)
Discussion started by: praveenbvarrier
1 Replies
5. Shell Programming and Scripting
I am looking for a script which does the following
Script will run daily.
1.It will get snapshot off all filesystems including nfs mounts, automounts and clearcase mounts.
2.Then it will compare new snapshot with the snapshot created in the previous run.
3.If filesystem exists in... (20 Replies)
Discussion started by: saidiya
20 Replies
6. Shell Programming and Scripting
I need to write the script for the below constraints. Need your help urgently
The PATH environment variable must conform to the following:
• World-writeable directories (/tmp, /var/tmp etc) must not be placed in the PATH variable.
• System directories must always be placed before local... (1 Reply)
Discussion started by: kmvinay
1 Replies
7. Shell Programming and Scripting
Hello gurus
I am looking for a script :
We need to generate a file list created by user id on a AIX box.
Criteria 1: other than userid : dwimpid & aiadmin
Criteria 2: Files older than 2 months ( it can be any user id ).
File Path to Look: /project and /project1
Thx
silu (7 Replies)
Discussion started by: silu
7 Replies
8. Shell Programming and Scripting
I want to run a script that checks the env to see if I'm in a test or prod environment. From the command line I enter echo $host and it returns host name and I can tell by the name if I'm in test or prod. When I run the command from a script I get "not found" What's wrong with the script?
if ... (2 Replies)
Discussion started by: Bperl1967
2 Replies
9. Shell Programming and Scripting
Hi All,
Can you please let me know what I missed in the below function? Whenever I try to execute the script i am getting
syntax error at line 101 : `fi' unexpected
Function is
function DELNWE5O {
export ORACLE_HOME=/ora00/app/oracle/product/11.2.0/grid_1
export... (9 Replies)
Discussion started by: pvmanikandan
9 Replies
10. Shell Programming and Scripting
Hi Guys,
I am trying to learn to script.
first I have 2 server, A and B.
A with IP 192.168.82.22. B with IP 192.168.82.44.
Both with login user admin and password admin.
server A will generate a file every day with name gg.log under /app/gg/20171002.log. I wish to write a script to copy the... (7 Replies)
Discussion started by: leecopper
7 Replies
LEARN ABOUT MOJAVE
net::ldap::control::passwordpolicy
Net::LDAP::Control::PasswordPolicy(3) User Contributed Perl Documentation Net::LDAP::Control::PasswordPolicy(3)
NAME
Net::LDAP::Control::PasswordPolicy - LDAPv3 Password Policy control object
SYNOPSIS
use Net::LDAP;
use Net::LDAP::Control::PasswordPolicy;
use Net::LDAP::Constant qw( LDAP_CONTROL_PASSWORDPOLICY );
$ldap = Net::LDAP->new( "ldap.example.com" );
$pp = Net::LDAP::Control::PasswordPolicy->new;
$mesg = $ldap->bind( "cn=Bob Smith,dc=example,dc=com",
password => "secret",
control => [ $pp ] );
# Get password policy response
my($resp) = $mesg->control( LDAP_CONTROL_PASSWORDPOLICY );
if (defined($resp)) {
my $v = $resp->pp_error;
print "Password policy error $v
" if defined $v;
$v = $resp->time_before_expiration;
print "Password expires in $v second(s)
" if defined $v;
}
DESCRIPTION
"Net::LDAP::Control::PasswordPolicy" provides an interface for the creation and manipulation of objects that represent
"PasswordPolicyRequest"s and "PasswordPolicyResponse"s as described by draft-behera-password-policy-09.
This control can be passed to most operations, including the bind.
CONSTRUCTOR ARGUMENTS
There are no constructor arguments other than those provided by Net::LDAP::Control.
METHODS
time_before_expiration
If defined, this is an integer value holding the time left in seconds before the account's password will expire.
grace_authentications_remaining
If defined, this is an integer value holding the number of authentication requests allowed before the account is locked.
pp_error
If defined, this contains a more detailed error code for the account. See Net::LDAP::Constant for definitions of each. Values can
include:
LDAP_PP_PASSWORD_EXPIRED
LDAP_PP_ACCOUNT_LOCKED
LDAP_PP_CHANGE_AFTER_RESET
LDAP_PP_PASSWORD_MOD_NOT_ALLOWED
LDAP_PP_MUST_SUPPLY_OLD_PASSWORD
LDAP_PP_INSUFFICIENT_PASSWORD_QUALITY
LDAP_PP_PASSWORD_TOO_SHORT
LDAP_PP_PASSWORD_TOO_YOUNG
LDAP_PP_PASSWORD_IN_HISTORY
SEE ALSO
Net::LDAP, Net::LDAP::Control, Net::LDAP::Constant, draft-behera-ldap-password-policy-09.txt
AUTHOR
Chris Ridd <chris.ridd@isode.com>
Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>
COPYRIGHT
Copyright (c) 2008 Chris Ridd. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same
terms as Perl itself.
perl v5.18.2 2013-07-21 Net::LDAP::Control::PasswordPolicy(3)