Access to the /var/adm/syslog


 
Thread Tools Search this Thread
Operating Systems AIX Access to the /var/adm/syslog
# 1  
Old 11-26-2010
Access to the /var/adm/syslog

Hi
I have an Active passive HACMP cluster
Everyday I need to come and give read only access to other users to the syslog file using [chmod o+r syslog*] in both the nodes.
Is there any way that this can be automated in such a way that the other users always have read access to the syslog files.

Code:
root@cbspsdb01 [/var/adm] #ls -l | grep -i syslog
-rw-r--r--    1 root     system       595619 Nov 26 08:17 syslog
-rw-r--r--    1 root     system     17227351 Nov 26 08:17 syslog.0
-rw-r--r--    1 root     system     10000523 Nov 16 03:01 syslog.1
-rw-r--r--    1 root     system     10000009 Nov 16 01:58 syslog.11
-rw-r--r--    1 root     system     10000187 Nov 16 01:52 syslog.12
-rw-r--r--    1 root     system     10000560 Nov 16 02:55 syslog.2

========================================================================

Code:
root@cbspsdb02 [/var/adm] #ls -l | grep -i syslog
-rw-r--r--    1 root     system      2198909 Nov 26 08:15 syslog
-rw-r--r--    1 root     system     10000259 Nov 26 00:43 syslog.0
-rw-r--r--    1 root     system     10000169 Nov 23 12:50 syslog.1
-rw-r--r--    1 root     system     10000387 Nov 23 12:46 syslog.2
-rw-r--r--    1 root     system     10000100 Nov 22 22:25 syslog.3

Moderator's Comments:
Mod Comment edit by bakunin: please use CODE-tags when posting code, console output and the like. Thank you.

Last edited by bakunin; 11-26-2010 at 09:29 AM..
# 2  
Old 11-26-2010
You could consider scanning the files for obvious errors and emailing the users a nice report. A couple times a day I scan the syslog files and email a report like (my cut and paste didn't quite work):

Code:
AIX syslog errors

Current date and time: Thu Nov 25 15:00:14 CST  2010
Hostname: ms
Syslog errors since: Nov 25 14:00:19

/var/adm/syslog/critical.log errors:
Nov 25 14:17:40 unxm1_sw su: BAD SU from xxxxx to xxxxx at /dev/pts/5
 
/var/adm/syslog/errmsgs.log errors:
/var/adm/syslog/auth.log errors:
/var/adm/syslog/mail.log errors:
/var/adm/syslog/mail.debug.log errors:
/var/adm/syslog/daemon.log errors:
/var/adm/syslog/user.log errors:
/var/adm/syslog/ipsec.log errors:
/var/adm/syslog/daemon.debug.log errors:

Nov 25 14:41:21 xx xntpd[372934]: synchronisation lost
Nov 25 14:46:41 xx xntpd[372934]: synchronized to 192.168.122.76, stratum=3
Nov 25 14:41:21 xx xntpd[372934]: time reset (step) -0.202493 s

Moderator's Comments:
Mod Comment edit by bakunin: please use CODE-tags when posting code, terminal output or the like. Thank you.

Last edited by bakunin; 11-26-2010 at 09:37 AM..
# 3  
Old 11-26-2010
Probably this is because of your syslog configuration, which is located in "/etc/syslog.conf".

If this doesn't work and as a last resort you could set up a cron job for root, which sets the right permissions to all the log files.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 4  
Old 11-28-2010
Access to the /var/adm/syslog

Hi

This is solved after adding the below cron job to root user:
Code:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * chmod o+r /var/adm/syslog*


Last edited by Scott; 11-28-2010 at 07:30 AM.. Reason: Code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Difference between /var/log/syslog and /var/adm/messages

Hi, Is the contents in /var/log/syslog and /var/adm/messages are same?? Regards (3 Replies)
Discussion started by: vks47
3 Replies

2. Solaris

/var/adm & /var/sadm

what is the difference between tha /var/adm and /var/sadm files in solaris 10 Os please can any one respond quickly thanking you (2 Replies)
Discussion started by: wkbn86
2 Replies

3. Shell Programming and Scripting

trying get the last /var/adm/messages

grep \"^`date "+%b %d %T"`\" /var/adm/messages | egrep \"emerg|alert|crit|err|warning\ but get an output like this ksh: alert: not found ksh: crit: not found ksh: err: not found ksh: warning": not found grep: can't open "19" grep: can't open "16:27:16"" (1 Reply)
Discussion started by: arch12
1 Replies

4. Solaris

diff b/w /var/log/syslog and /var/adm/messages

hi sirs can u tell the difference between /var/log/syslogs and /var/adm/messages in my working place i am having two servers. in one servers messages file is empty and syslog file is going on increasing.. and in another servers message file is going on increasing but syslog file is... (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

5. Solaris

/var/adm/messages

Hello Friends, I am geting the folowing error in /var/adm/message is it disl related problem? if yes.. how to check all the disk are perfect or not? Sep 15 06:01:12 scsi: WARNING: /pci@1f,700000/scsi@2/sd@2,0 (sd7): Sep 15 06:01:12 Error for Command: write(10) Error Level:... (5 Replies)
Discussion started by: bullz26
5 Replies

6. UNIX for Dummies Questions & Answers

/var/adm/messages

Hi, No log entry is found in messages files. The file size is 0. We are using Solaris 9. Anyone knows what could be wrong. (3 Replies)
Discussion started by: FrankC
3 Replies

7. Solaris

/var/adm/messages

I'm running a Solaris 9 box with Oracle databases on it. I'm getting the following messages in my /var/adm/messages log "Jun 24 12:30:32 sundb01 bootpd: IP address not found: xxx.xxx.xxx.xxx" ...where xxx.xxx.xxx.xxx is DHCP IP addresses of Windows 2000 workstations in the organisation. ... (2 Replies)
Discussion started by: soliberus
2 Replies

8. UNIX for Dummies Questions & Answers

var/adm/cron

Hi, Here im using WinSCP and looking into the remote dir var/adm/cron and I get the following error.Is this bcoz i dont have admin privileges: Cannot get real path for '/var/adm/cron'. Unexpected OK response. Error code: 0 Error message from server: Success Request code: 16 BTW im... (1 Reply)
Discussion started by: thumsup9
1 Replies

9. Solaris

/var/adm/loginlog

As root I have created the loginlog file in /var/adm with permissions (r and w) for root:root only. Failed attempts(> 5) to log in as root do not get logged in the file. What am I missing?? I am on a Solaris 8 Box. :confused: :confused: :confused: (4 Replies)
Discussion started by: encrypted
4 Replies

10. UNIX for Dummies Questions & Answers

Messages in /var/adm

Just want to check with all of you out there what does the following warning means in my "messages" file in /var/adm the warning is Prevous Time Adjustment Incomplete , does it mean my hard ware is faulty if so which piece of hardware it is ? (1 Reply)
Discussion started by: owls
1 Replies
Login or Register to Ask a Question