Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Mar 29, 2024 4:53 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
PostPosted: Tue Oct 28, 2008 3:23 am 
Offline
Newbie

Joined: Mon Aug 18, 2008 12:56 pm
Posts: 6
It's great that OpenAudit can query systems that have a certain software installed, but how do you the opposite and query systems that do NOT have the specific software installed? I need to apply a patch on all my machines (new Microsoft update) and I want to see which systems do not have the patch yet. I have about 200 machines.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 28, 2008 3:59 am 
Offline
Contributor

Joined: Fri Jul 28, 2006 6:30 am
Posts: 157
Location: London
Take a look at this thread:
[url]http://www.open-audit.org/phpBB3/viewtopic.php?f=5&t=2188&hilit=[/url]

I created a stored procedure:
[code]DELIMITER $$

DROP PROCEDURE IF EXISTS `PatchStatus`$$
CREATE PROCEDURE `PatchStatus`(IN inVar VARCHAR(100))
BEGIN

SELECT * FROM
(
SELECT system_name, 'Installed' as inVar FROM software, system
WHERE software_name LIKE CONCAT('%',inVar,'%') AND software_uuid = system_uuid

UNION

SELECT DISTINCT system_name, 'Not Installed' AS software_name
FROM system WHERE system_name NOT IN
(SELECT DISTINCT system_name FROM software, system
WHERE software_name LIKE CONCAT('%',inVar,'%') AND software_uuid = system_uuid)
)
AS U
ORDER BY system_name;
END $$

DELIMITER ;
[/code]

which can then be used like so:
[code]Call PatchStatus('KB123456')[/code]

_________________
Cheers, Nick.

[size=85]OA Server: Windows Server 2003 / Apache 2
Auditing: 1600 Workstations, 200 Servers
OS's: Windows XP / Windows 2000 / Windows 2003 Server / Windows Vista
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 28, 2008 4:04 am 
Offline
Newbie

Joined: Mon Aug 18, 2008 12:56 pm
Posts: 6
Thanks NickBrown! I will try that SQL statement and see what happens.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group