Solved

OLDCMP usage

Posted on 2008-09-29
5
1,739 Views
Last Modified: 2008-10-06
I want to use OLDCMP to target a particular OU for some mainteanance tasks.
The only issue I have is that the OU in question has a space in the name and the search qualifier doesn't work.
Any hints on syntax to get this working ? Renaming the OU is not something we can do at this time.

Here is what I am running to start with:

oldcmp -report -b ou=namewith aspace in it, dc=dcname,dc=com -age 0

This works fine on other OU's without spaces. In the file this command generates it shows the following:

Search Base: namewith


0
Comment
Question by:Conchial
  • 3
  • 2
5 Comments
 
LVL 19

Expert Comment

by:aissim
Comment Utility
Should just need to put quotes around the path:

oldcmp -report -b "ou=namewith aspace in it,dc=dcname,dc=com" -age 0
0
 

Author Comment

by:Conchial
Comment Utility
That does appear to work.
However , i need to modify what I asked.
The OU i want to taget is underneath another OU and oldcmp  is returning an error.


The actual line I am running is :

oldcmp -report -b "ou=level1ou, ou=namewith aspaceinit, dc=**, dc=***,dc=***,dc=com" -age 0

That returns

Processed at DCNAME.***.**.**.com
Default Naming Context: DC=***,DC=**,DC=***,DC=***

ldap_get_next_page_s: [DCNAME.***.**.**.com] Error 0x20 (32) - No Such Object

When i this command:

dsquery computer "ou=level1ou, ou=namewith aspaceinit, dc=**, dc=***,dc=***,dc=com"

That returns
dsquery failed:Directory object not found.

I'm sure it's a syntax issue but cannot figure it out



0
 

Author Comment

by:Conchial
Comment Utility
dsquery computer "cn=level1ou, cn=namewith aspaceinit, dc=**, dc=***,dc=***,dc=com"

also fails with a Directory Object not found error.
0
 
LVL 19

Accepted Solution

by:
aissim earned 500 total points
Comment Utility
Yeah, looks like something's wrong with the path. Using dsquery I would start at the top-level domain and work backwards; that should tell us where it breaks...

dsquery computer dc=**,dc=***,dc=***,dc=com


Also - you say it doesn't work with CN either - I would find out for certain whether they're containers or OU's.
0
 

Author Comment

by:Conchial
Comment Utility
Finally nailed it, thanks.
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

I have never ceased to be amazed how many problems you can encounter on a fresh install of a Windows operating system.  This is certainly case in point& Unable to complete ANY MSI installation.  This means Windows Updates are failing and I can't …
Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now