PDA

View Full Version : [SOLVED] lynis auditing tool for unix



boregard
September 17th, 2011, 10:36 PM
Hello, I installed Lynis Auditing tool and now I need help viewing the results. To start with how do I see a log of the results? I was in the terminal and pressing enter instead ctr+cl and the terminal unexpectedly closed before I could save the results. Appreciate any help or advice.

haqking
September 17th, 2011, 10:43 PM
Hello, I installed Lynis Auditing tool and now I need help viewing the results. To start with how do I see a log of the results? I was in the terminal and pressing enter instead ctr+cl and the terminal unexpectedly closed before I could save the results. Appreciate any help or advice.

/var/log/lynis-report.dat (this will show you recommendations on how to secure things)
/var/log/lynis.log

boregard
September 17th, 2011, 11:13 PM
Sorry I still need clarification, I entered ( /var/log/lynis-report.dat ) in the terminal and tried logfile viewer and keep getting permission denied. Thanks

haqking
September 17th, 2011, 11:21 PM
Sorry I still need clarification, I entered ( /var/log/lynis-report.dat ) in the terminal and tried logfile viewer and keep getting permission denied. Thanks


well you wouldnt just enter /var/log/lynis-report.dat into a terminal you need to pipe it to a reader or redirect to another output.

cat or nano or vi or gedit etc (if you use gedit then gksudo it and not sudo)

as for permission denied it will need root so use sudo as you shoud have to run lynis in the first place

boregard
September 18th, 2011, 12:07 AM
How do I pipe it to a reader?

haqking
September 18th, 2011, 12:18 AM
How do I pipe it to a reader?


ok well i assume they are there and the audit ran ok, you should of seen a text based gui come up whilst it was auditing ?

anyways so to view the logs then use sudo and any reader of your choice as i mentioned, using tail, more, less etc as they will be long or...

you might want to view it in gedit so:


gksudo gedit /var/log/logname
or in nano:


sudo nano /var/log/xxxxor concatenate it with cat:


cat /var/log/xxxxor vi/vim


sudo vim /var/log/xxxetc etc

If you run a graphical one then use gksudo and not sudo though. from what i remember they are lengthy logs, im not sure which one you will find most suitable to view it, or of course run the log file viewer with gksudo as:


gksudo gnome-system-log &

Dangertux
September 18th, 2011, 12:51 AM
That project hasnt really been updated in awhile and like most generic "nix" auditing tools spits out false positives when dealing with ubuntu.

But yeah it logs to /var/log and /tmp

Also this might be helpful. http://www.rootkit.nl/files/lynis-documentation.html

boregard
September 18th, 2011, 01:29 AM
Thanks to both of you for your help! I finally figured out how to view the log using the gk sudo cmd. If the project hasn't been updated in a while and spits out false positives I prolly wont use it much. Least I know how to find logfiles and view them now. Just trying to learn how to secure system. Much Thanks.

haqking
September 18th, 2011, 01:30 AM
Thanks to both of you for your help! I finally figured out how to view the log using the gk sudo cmd. If the project hasn't been updated in a while and spits out false positives I prolly wont use it much. Least I know how to find logfiles and view them now. Just trying to learn how to secure system. Much Thanks.


no worries, you are welcome.

please use thread tools menu to mark as solved.

cheers