Visit The New, Modern Unix Linux Community

Help me, write a bash script to delete parent entry with all their child entry in LDAP UNIX server

Thread Tools Search this Thread
Contact Us Post Here to Contact Site Administrators and Moderators How to Post in the The UNIX and Linux Forums Help me, write a bash script to delete parent entry with all their child entry in LDAP UNIX server
# 1  
Help me, write a bash script to delete parent entry with all their child entry in LDAP UNIX server

Hi All,

Please help me and guide me to write a bash/shell script on Linux box to delete parent entry with all their child entries.

Parent is :
dn:, o=wipro, o=in

child is:
dn: cn: yogesh kumar,, o=wipro, o=in


I have list of users in a file, they must delete from servers.

or is there any way to write an script to delete all the child entries if we delete their parent entry only?

Its urgent, please help.

Moderator's Comments:
Mod Comment Please use CODE tags (not QUOTE tags) to surround all sample input, sample output, and code segments.
The CODE tags need to surround tagged data like this: [CODE]data[/CODE] which produces:

Not before the data like [CODE][/CODE]data.

Last edited by Don Cragun; 11-21-2015 at 11:17 PM.. Reason: Add COE tags, remove ineffective QUOTE tags.
# 2  
Without knowing the infrastructure of the LDAP system, if that's just text config files: yes, your request should be doable. Give some more details.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #770
Difficulty: Medium
IBM POWER4 (2001) had off-chip L3 caches of 32 MB per processor, shared among several processors.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to replace multiple "&nbsp;" entry with in <td> tag into single entry using sed?

I have the input file like this. Input file: 12.txt 1) There are one or more than one <tr> tags in same line. 2) Some tr tags may have one <td> or more tna one <td> tags within it. 3) Few <td> tags having "<td> &nbsp; </td>". Few having more than one "&nbsp;" entry in it. <tr> some td... (4 Replies)
Discussion started by: thomasraj87
4 Replies

2. Solaris

Set password in bash script without manual entry-Solaris 10

Hi I have a root script which is setting up user and his dirs and so on. After I create user and set up all the necessary I have to manually set user password. I try all possible ways what google find me and nothing works for me. If maybe one of you have a solution for my problem it will be... (1 Reply)
Discussion started by: Jaffakeks
1 Replies

3. Shell Programming and Scripting

Modifying/Adding in the DNS server entry using shell script

Dear Experts. I need to add/modify the entries in the DNS server and this has to be achieved using shell script and below is the requirement, could you please let me know if a shell script can be written for this task? 1. Log in to primary DNS server 2. Check /etc/named.conf if zone is... (4 Replies)
Discussion started by: VKIRUPHAKARAN
4 Replies

4. Shell Programming and Scripting

How to write a new entry at the beginning of a log file instead of at the end?

Hi Ladies and Gents, Explanation of my question with an example: Let's consider the script: #!/bin/bash rsync -auv $dir $backup_dir >> backup_every_hour_script.log Each time this script is called there will be a new entry at the end of the file... (1 Reply)
Discussion started by: freddie50
1 Replies

5. Programming

physical delete parent - child

hi , I have 4 tables 1.table 1 2.table 2 ==> delete from here 3.table 3 4.table 4 table 2 & table 3 has pk_fk relationship table 1 & table 4 ha spk_fk relationship basically i wanted to do physical delete few rows from table 2 (Parent), it should delete from... (0 Replies)
Discussion started by: balajikalai
0 Replies

6. Shell Programming and Scripting

Unix script to detect new file entry in directory

Hi All, I want to detect each new file coming / getting created in unix directory. When every new file came to directory, i have to get its details like its size , date and time stamp and store it into another file. Could any one please tell me , how i can achieve that? Thanks. (13 Replies)
Discussion started by: james_1984
13 Replies

7. Shell Programming and Scripting

shell script to edit file and delete entry

Can anyone provide me a shell script to edit a xml file and delete one entry. To do manually i can edit(vi editor) the file and 'dd' will delete the file.But I wiluld to know if I can do with a script. Thanks in advance Tannu (6 Replies)
Discussion started by: tannu
6 Replies

8. Programming

Whant to write an entry in /etc/passwd (putpwent)

Hi i try to use the function putpwent to write a simple entry in "/etc/passwd" putpwnet returns 0 as it works but notething writes to /etc/passwd. What have i missed? My os -------- root@nighter-laptop:/home/nighter/labb# uname -a Linux nighter-laptop 2.6.22-14-generic #1 SMP Sun Oct 14... (5 Replies)
Discussion started by: nighter
5 Replies

9. SCO

Failed Write of utmpx entry

I had a drive go bad. I have replaced the drive and have my system up. I have a 1-to-1 mirror raid. My mirrored boot drive brings the system up. I issued a reboot command. The system comes up gives me a login prompt and generates the error: failed write of utmpx entry:"i2". What is i2? (1 Reply)
Discussion started by: jwideman
1 Replies

10. UNIX for Advanced & Expert Users

shutting down 5.7 on Intel: failed to write of utmpx entry

When shutting down a freshly installed version of 5.7 on a Compaq server I get two messages: INIT: failed to write of utmpx entry: "s0" and: INIT: failed to write of utmpx entry: "fw" then I can continue with the shutdown. When I bring the system back up it has not saved any of my... (2 Replies)
Discussion started by: DarkLord
2 Replies

Featured Tech Videos