Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jan 2005 06:16:34 GMT
From:      "Alexandr S. Tikhonoff" <tikhonoff@users.sourceforge.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/76491: Addition into /etc/security few new functions
Message-ID:  <200501200616.j0K6GYAN013890@www.freebsd.org>
Resent-Message-ID: <200501200620.j0K6KOpj070979@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         76491
>Category:       misc
>Synopsis:       Addition into /etc/security few new functions
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 20 06:20:24 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Alexandr S. Tikhonoff
>Release:        
>Organization:
ASTI
>Environment:
>Description:
In this addition was realized tracing two errors. At first, there are file permission errors in important directories. At second - search crash records in system messages.
>How-To-Repeat:
      
>Fix:
--- securityadd	Sun Jan  9 12:31:46 2005
+++ security	Sun Jan  9 12:31:46 2005
@@ -33,6 +33,8 @@
 rc=0
 LOG=/var/log
 TMP=/var/run/_secure.$$
+stoday="/var/log/localsec.today" 		# path to today security log
+syester="/var/log/localsec.yesterday"		#path to yesterday security log
 
 separator () {
 	echo ''
@@ -232,5 +234,34 @@
 
 rm -f ${TMP}
 
+ rm $syester
+ mv $stoday $syester
+
+  echo "stoday Log for:" >> ${stoday}
+  date >> ${stoday}
+  cat /etc/passwd | grep "guest" >> ${stoday}
+  cat /etc/passwd | grep "anonymous" >> ${stoday}
+  echo "File permission errors in /bin" >> ${stoday}
+  ls -l /bin | grep "rwx  " >> ${stoday}
+  ls -l /bin | grep "rw-  " >> ${stoday}
+  echo "File permission errors in /sbin" >> ${stoday}
+  ls -l /sbin | grep "rwx  " >> ${stoday}
+  ls -l /sbin | grep "rw-  " >> ${stoday}
+  echo "File permission errors in /etc" >> ${stoday}
+  ls -l /etc | grep "rwx  " >> ${stoday}
+  ls -l /etc | grep "rw-  " >> ${stoday}
+  echo "File permission errors in /usr/bin" >> ${stoday}  
+  ls -l /usr/bin | grep "rwx  " >> ${stoday}
+  ls -l /usr/bin | grep "rw-  " >> ${stoday}
+  echo "File permission errors in /usr/sbin" >> ${stoday}  
+  ls -l /usr/sbin | grep "rwx  " >> ${stoday}
+  ls -l /usr/sbin | grep "rw-  " >> ${stoday}
+  echo "File permission errors in /root" >> ${stoday}  
+  ls -l /root | grep "rwx  " >> ${stoday}
+  ls -l /root | grep "rw-  " >> ${stoday}
+echo ""
+  echo "Crashes?" >> ${stoday}
+  last | grep "crash" >> ${stoday}  
+cat $stoday
 exit $rc
 

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501200616.j0K6GYAN013890>