Q on <user> of syslog message generated by logger command


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Q on <user> of syslog message generated by logger command
# 1  
Old 04-16-2009
Q on <user> of syslog message generated by logger command

Generally(at least on AIX5.3, Solaris9, OS X)'logger' command would create syslog messages which carry <login name> . On Solaris9, I have experienced two circumstances in which 'logname' command fails. In this circumstance I saw the 'logger' command generated syslog messages which carry alternatively <real or effective user name> instead of the <login name> that is seemingly unable for the logger to retrieve. One of the circumstances is on shells(either ksh or csh) running on the emacs buffer. For the other one, sorry, I can not tell you here.
Are there any ways by which we can let the logger to create syslog messages with <real or effective user name> instead of <login name>?

Thanks,
masaki

correction: replaced "effective" with "real or effective"

Last edited by masaki; 04-16-2009 at 03:34 AM.. Reason: to be more accurate
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Logger command not working for one script

Hi, On RHEL 7.2, I created below script in cronjob for every minute. If this process is found to be not running, it should record message in /var/adm/xymessages, start it and send email. #!/bin/bash source /export/home/prodadm/.bash_profile if ; then ... (8 Replies)
Discussion started by: ron323232
8 Replies

2. Shell Programming and Scripting

Error message while openning the xls file generated by UNIX

Hi All, I have created a unix script to mail the xls file.This is being done using mailx command fdate=`tail -1 abc.xls | cut -c1-8` SUBJECT="CARD GL Exceptions : ${ENV} for ${fdate}" destname=CARD_GL_Exceptions_$fdate sed 's/#BUSINESS/BUSINESS/1' abc.xls > abc2.xls mv abc2.xls abc.xls... (2 Replies)
Discussion started by: karthik adiga
2 Replies

3. Shell Programming and Scripting

Piping the "script" command through the logger command.

I use the snippet below in /etc/profile on RHEL Linux to capture command line logging and it all works well and good. Now I'd like to pipe the same output from script through the logger command so it all gets logged to syslog. The only additional code I've added is in bold below (|... (4 Replies)
Discussion started by: woodson2
4 Replies

4. Shell Programming and Scripting

Files generated by a particular user

Hi I have the following files generated by different users on a directory -rw-rw-r-- 1 NAME1 database03 809 Nov 17 10:41 PCAS_CARD_TRANS_OFF.1111171041.lg -rw-rw-r-- 1 richard ccsdba 10968411 Nov 17 10:43 load_123_RX0_0.1111171016.lg -rw-rw-r-- 1 DEV db03 10713 Nov 17... (5 Replies)
Discussion started by: bobby1015
5 Replies

5. Shell Programming and Scripting

Retrieve logs generated in last 10 mins from a log file using 'grep' command

HI All, I have a log file where the logs will be in the format as given below: 2011-05-25 02:32:51 INFO PROCESS STARTING 2011-05-25 02:32:52 INFO PROCESS STARTED . . . I want to retrieve only the logs which are less than 5 mins older than current time using grep... (3 Replies)
Discussion started by: rvhg16
3 Replies

6. Shell Programming and Scripting

Need a command to delete all files apart from last file generated

Hi, I have a directory named (/output). this directory has files in the below format abc.* , xyz*, djj*, iwe*, weewe*, rier*, 3948903ddfgf* these files are generated at random. what i need to do is. delete all the files of all kinds but keep only the last generated file of... (5 Replies)
Discussion started by: dazdseg
5 Replies

7. Shell Programming and Scripting

Need help in sed command (adding a blank line btw each block generated by pattern)

Hello friends, I have a C source code containing sql statements. I use the following sed command to print all the sql blocks in the source code.... sed -n "/exec sql/,/;/p" Sample.cpp The above sed command will print the sql blocks based on the pattern "exec sql" & ";"... (2 Replies)
Discussion started by: frozensmilz
2 Replies

8. UNIX for Advanced & Expert Users

User of the file OR Logger of the file. ?

How could I get the name of user of a file in a file path ? OR Who i accessing the particular file in a file path ? Any Idea ?? Please help !! Thanks :) (1 Reply)
Discussion started by: varungupta
1 Replies

9. Shell Programming and Scripting

Logger Command

Hi I have a command in a script . /usr/bin/iostat -E I would like to place an entry in /var/adm/messages (via syslog) as a daemon.notice using the logger command but i just cant work out the syntax for this , do I pipe the output of iostat into logger? or is it redirected...can somebody give me... (1 Reply)
Discussion started by: hcclnoodles
1 Replies

10. Post Here to Contact Site Administrators and Moderators

User generated FAQ and Best Practices section

There are some common tasks and best practices that could be shared with the group by all the good people on the board. Having a admin approved/user generated section of this sort might be nice. Often there are lots of tidbits that could be grown into a useful document. Just a thought. ... (5 Replies)
Discussion started by: kduffin
5 Replies
Login or Register to Ask a Question
Courier::Filter::Logger::Syslog(3pm)			User Contributed Perl Documentation		      Courier::Filter::Logger::Syslog(3pm)

NAME
Courier::Filter::Logger::Syslog - Syslog logger for the Courier::Filter framework SYNOPSIS
use Courier::Filter::Logger::Syslog; my $logger = Courier::Filter::Logger::Syslog->new(); # For use in an individual filter module: my $module = Courier::Filter::Module::My->new( ... logger => $logger, ... ); # For use as a global Courier::Filter logger object: my $filter = Courier::Filter->new( ... logger => $logger, ... ); DESCRIPTION
This class is a syslog logger class for use with Courier::Filter and its filter modules. It is derived from Courier::Filter::Logger::IOHandle. Constructor The following constructor is provided: new: returns Courier::Filter::Logger::Syslog; throws Courier::Error Creates a new logger that logs messages to syslog. Instance methods The following instance methods are provided, as inherited from Courier::Filter::Logger::IOHandle: log_error($text): throws Perl exceptions Logs the error message given as $text (a string which may contain newlines). log_rejected_message($message, $reason): throws Perl exceptions Logs the Courier::Message given as $message as having been rejected due to $reason (a string which may contain newlines). SEE ALSO
Courier::Filter::Logger::IOHandle, Courier::Filter::Logger, Courier::Filter::Overview. For AVAILABILITY, SUPPORT, and LICENSE information, see Courier::Filter::Overview. AUTHOR
Julian Mehnle <julian@mehnle.net> perl v5.14.2 2011-12-27 Courier::Filter::Logger::Syslog(3pm)