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 8:12 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
PostPosted: Thu Apr 30, 2009 1:25 am 
Offline
Newbie

Joined: Fri Mar 06, 2009 11:38 pm
Posts: 4
Hi,

I have a few CentOS 5 servers with minimal package installed without X-Windows. I got the following errors when I run the http://chadsikorra.com/audit_linux.sh

=': not a valid identifier: declare: `
=': not a valid identifier: declare: `
=': not a valid identifier: declare: `
=': not a valid identifier: declare: `
=': not a valid identifier: declare: `
=': not a valid identifier: declare: `
hwinfo not found! Some information will be missing (such as Monitor information).
lshw not found! Some information will be missing (such as detailed network adapter information).
xrandr not found! Some information will be missing (Video Adapter information).

Rgds


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 30, 2009 8:27 am 
Offline
Contributor

Joined: Fri Jul 04, 2008 6:46 am
Posts: 153
Location: USA - WI
What does your audit.config look like?

Btw - There are some known issues with CentOS and the script I wrote. Well, more like issues with older versions of HAL and dmidecode, so some information will be missing. It should at least run though.

_________________
OA Server: Debian Squeeze w/ Apache2
Auditing: 700 Workstations, 250 or so Retail Terminals, about 75 Servers
OS's: Windows XP/2003/2008/2008 R2/Vista/7, Debian
LDAP: Active Directory 2008 R2


Top
 Profile  
Reply with quote  
PostPosted: Sat May 02, 2009 5:53 am 
Offline
Newbie

Joined: Fri Mar 06, 2009 11:38 pm
Posts: 4
Thanks for your reply Chad. Following is audit.config.


audit_location = "l"
verbose = "n"
online = "n"
strComputer = "."
script_name = "audit_linux.sh"
monitor_detect = "y"
printer_detect = "y"
software_audit = "y"
uuid_type = "uuid"

Do I need to install anything from HP? Server is HP DL360. But I do not install any driver or software from HP. The server is with CentOS 5 installation.

Regards,


Top
 Profile  
Reply with quote  
PostPosted: Sat May 02, 2009 6:53 am 
Offline
Contributor

Joined: Fri Jul 04, 2008 6:46 am
Posts: 153
Location: USA - WI
Interesting...I'm not too sure what's causing it. I'd have to see if I can replicate it on my VM at home. My initial thought was that you were using something other than quotations around the values in your audit.config, so it was failing to parse it. However, you could su to root and do the following....

[code]
./audit_linux.sh -Lo off
[/code]

That will produce the same thing that the audit.config is specifying.

_________________
OA Server: Debian Squeeze w/ Apache2
Auditing: 700 Workstations, 250 or so Retail Terminals, about 75 Servers
OS's: Windows XP/2003/2008/2008 R2/Vista/7, Debian
LDAP: Active Directory 2008 R2


Top
 Profile  
Reply with quote  
PostPosted: Tue May 05, 2009 8:11 am 
Offline
Newbie

Joined: Fri Mar 06, 2009 11:38 pm
Posts: 4
Thanks Chad. I got it run. It does not give a lot of information though since my server does not have all the packages installed. To get the full information, what additional packages do I need to install?

Thanks and regards,


Top
 Profile  
Reply with quote  
PostPosted: Tue May 05, 2009 9:14 am 
Offline
Contributor

Joined: Fri Jul 04, 2008 6:46 am
Posts: 153
Location: USA - WI
Yeah, lots of info may be missing because of issues with differences in HAL keys and older versions of dmidecode not supplying as much information. I'm tempted to sit down some time and fix the issues, but I feel like it may not be worth it. I'm currently working on getting a web audit scheduling system functioning for my work and I'll most likely rewrite the linux script in Perl so it better integrates with what I'm doing and to just make the process more sane than a bash script.

Installing LSHW and hwinfo may give you some more info...maybe not.

_________________
OA Server: Debian Squeeze w/ Apache2
Auditing: 700 Workstations, 250 or so Retail Terminals, about 75 Servers
OS's: Windows XP/2003/2008/2008 R2/Vista/7, Debian
LDAP: Active Directory 2008 R2


Top
 Profile  
Reply with quote  
PostPosted: Fri May 08, 2009 4:27 pm 
Offline
Newbie

Joined: Thu Apr 23, 2009 4:36 pm
Posts: 4
Chad, I see you use VM as well. Uhm... I tried to audit a CentOs 5.2 from my VMware player. Though in order to do that, I needed to type the following commands in the terminal:

dos2unix audit_linux.sh
chmod o+x audit_linux.sh
sudo ./audit_linux.sh

Those were just commands found through researching the net. I don't actually understand what they do too lol XD But we do whatever works. XD Then manually copy the generated text file to the Add a System page. The results are incomplete though and the system also do not detect my VM's ip address. Is there an alternative way that would make audit_linux.sh run and give a more complete information?

Thanks. :D


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 01, 2009 4:45 am 
Offline
Contributor

Joined: Fri Jul 04, 2008 6:46 am
Posts: 153
Location: USA - WI
I did a little digging into the CentOS issues with the script, and I think I squashed a few of the bugs. I'm currently just testing on the CentOS VM I have running under VirtualBox though. Maybe next week I can get our sysadmin to run the script under the CentOS box we have again, as I don't have direct access to it. I primarily developed the script using debian/ubuntu and tried to test on Suse/Slackware/Arch. So I kinda neglected the RedHat side of things. Someone want to let me know if this one works any better?

Grab the new script from here : http://chadsikorra.com/audit_linux.sh

If the box has access to the internet, just ...

wget http://chadsikorra.com/audit_linux.sh
chmod +x ./audit_linux.sh

Then just su to root and run it.

_________________
OA Server: Debian Squeeze w/ Apache2
Auditing: 700 Workstations, 250 or so Retail Terminals, about 75 Servers
OS's: Windows XP/2003/2008/2008 R2/Vista/7, Debian
LDAP: Active Directory 2008 R2


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 06, 2010 11:37 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Where does the latest audit_linux.sh script live, I thought it was in the SVN, but I either missed it when I checked out the SVN, or it was never there in the first place.... :?

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


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.  [ 9 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