Please use code tags in future when posting commands, logs, data etc. I have changed this in your post already.
You might want to use a loop like a while/read around the command ldapdelete and feed it with that list.
Though to be better safe than sorry you will have a small list of users to delete (let's say 3 of them), instead of all 15.000.
Hi,
In a shell script I am makin use of 3 files f1,f2 and f3.txt.
When the Unix server is restarted I want to delete all these 3
files if they are existing.
( I suppose I will have to use this command
rm /thefilepath/f*
but dont know in which script to use.)
Anyone knows what can be... (6 Replies)
Hi,
I have a mail server with limited space and operating system is sun solaris 8 (sparc). I do not have provisions to increase the space for home directory.
So i have to delete files from /home/username/mail/trash which are more than 10 days old automatically.
So my script should be like... (1 Reply)
Hi Everyone,
Please help me with this. I have gone through many posts here but couldn't find what I wanted.
I have a file with 79000+ lines and I want to delete lines in a pattern.
I want to delete every 141st line in the file, starting from line 2000 till 50000.
Please help guys.
... (8 Replies)
Hi all
I currently use the following in shell.
#!/bin/sh
while read LINE
do
perl -i -ne "$/ = ''; print if !m'Using archive: ${LINE}'ms;" "datafile"
done < "listfile"
NOTE the single quote delimiters in the expression. It's highly likely the 'LINE' may very well have characters in it... (3 Replies)
Good morning,
Firstly my appologies if this post is not exactly approprate for this forum but I do not know were else to post it. If anyone knows of a better forum for this please let me know.
I need to script an ldapsearch that will interrogate both unix and windows ldap servers. When it... (1 Reply)
Hi All,
I am fairly new to the world of Unix, and I am looking for a way to replace a line of text in a file with a delimited array of values.
I have an aliases file that is currently in use on our mail server that we are migrating off of. Until the migration is complete, the server must stay... (8 Replies)
Folks,
I have written one script for following condition by referring some of online post in this forum. Please correct it if I'm missing something in it. (OS: AIX 5.3)
List the idle user. (I used whoidle command to list first 15 user and get username, idle time, pid and login time).... (4 Replies)
I have a text file with a list of items/patterns:
ConsensusfromCGX_alldays_trimmedcollapsedfilteredreadscontiglist(229095contigs)contig12238
ConsensusfromCGX_alldays_trimmedcollapsedfilteredreadscontiglist(229095contigs)contig34624... (1 Reply)
Hi everyone,
I am not that familiar with LDAP advanced contents. But since it is a popular secure tool for authentication, I preferred to user RedHat LDAP. The organization has 5 organizational units. There are 3 client servers and I want to limit each client to access different users.
So, I... (3 Replies)
Discussion started by: royalliege
3 Replies
LEARN ABOUT MOJAVE
net::ldap::search5.18
Net::LDAP::Search(3) User Contributed Perl Documentation Net::LDAP::Search(3)NAME
Net::LDAP::Search - Object returned by Net::LDAP search method
SYNOPSIS
use Net::LDAP;
$mesg = $ldap->search( @search_args );
@entries = $mesg->entries;
DESCRIPTION
A Net::LDAP::Search object is returned from the search method of a Net::LDAP object. It is a container object which holds the results of
the search.
METHODS
Net::LDAP::Search inherits from Net::LDAP::Message, and so supports all methods defined in Net::LDAP::Message.
as_struct ( )
Returns a reference to a HASH, where the keys are the DNs of the results and the values are HASH references. These second level HASHes
hold the attributes such that the keys are the attribute names, in lowercase, and the values are references to an ARRAY holding the
values.
This method will block until the whole search request has finished.
count ( )
Returns the number of entries returned by the server.
This method will block until the whole search request has finished.
entry ( INDEX )
Return the N'th entry (zero-based), which will be a Net::LDAP::Entry object. If INDEX is greater or equal than the total number of
entries returned then "undef" will be returned.
This method will block until the search request has returned enough entries.
entries ( )
Return an array of Net::LDAP::Entry objects that were returned from the server.
This method will block until the whole search request has finished.
pop_entry ( )
Pop an entry from the internal list of Net::LDAP::Entry objects for this search. If there are no more entries then "undef" is returned.
This call will block if the list is empty, until the server returns another entry.
references ( )
Return a list of references that the server returned. This will be a list of Net::LDAP::Reference objects.
sorted ( )
Return a list Net::LDAP::Entry objects, sorted by their DNs.
The sorting is done on the client side using Perl's alphanumerical sort operator "cmp".
sorted ( ATTR, ... )
Return a list of Net::LDAP::Entry objects, sorted by the specified attributes. The attributes are compared in the order specified, each
only being compared if all the prior attributes compare equal.
The sorting is done on the client side using Perl's alphanumerical sort operator "cmp".
shift_entry ( )
Shift an entry from the internal list of Net::LDAP::Entry objects for this search. If there are no more entries then "undef" is
returned.
This call will block if the list is empty, until the server returns another entry.
SEE ALSO
Net::LDAP, Net::LDAP::Message, Net::LDAP::Entry, Net::LDAP::Reference
ACKNOWLEDGEMENTS
This document is based on a document originally written by Russell Fulton <r.fulton@auckland.ac.nz>.
AUTHOR
Graham Barr <gbarr@pobox.com>
Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>.
COPYRIGHT
Copyright (c) 1997-2004 Graham Barr. 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::Search(3)