How Can I get terminal no when someone modifies CRONTAB file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How Can I get terminal no when someone modifies CRONTAB file
# 1  
Old 11-20-2009
How Can I get terminal no when someone modifies CRONTAB file

Hi All

I have a script which drops a mail with the changes done on crontab file for every 1 hour

Can anyone pls tell me how can I modify the script so that it should display the terminal from which the crontab file hasbeen modified.

Quick responce much appriciated !!

Many thanks in advance

---------- Post updated at 02:01 AM ---------- Previous update was at 12:48 AM ----------

Can any one pls help on this
# 2  
Old 11-20-2009
Have you checked with cron logs and messages/syslog etc ... there will be more info on when a cron is added. Also adjust the logging of details using /etc/syslog.conf
# 3  
Old 11-20-2009
Actually my question is to know the terminal no from which the cron has modified ,I dont see any detials related to this in syslog.conf
# 4  
Old 11-20-2009
No What I meant was to look in cron logs ... if you dont see anything then you need to adjust info in sysconf
# 5  
Old 11-20-2009
Actually Iam not sure where exactly cron logs reside..Can you pls advise
# 6  
Old 11-20-2009
Usually in /var/log/cron .. some times it is written in /var/log/messages or /var/cron/* ... depending on how the system is configured.

Could you provide detail of the OS version you are using.
# 7  
Old 11-20-2009
SunOS 5.10 Generic_137111-07 - "4.3"

---------- Post updated at 03:50 AM ---------- Previous update was at 03:44 AM ----------

I can find the logs under /var/cron/ but seems i cant access it , is there any way that i can get the terminal number who has modified the cron inorder to include inthe script
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies

2. Shell Programming and Scripting

Cannot get terminal application to launch with a graphical launcher when successful in terminal

I have been having an extremely annoying problem. For the record, I am relatively new at this. I've only been working with unix-based OS's for roughly two years, mostly Xubuntu and some Kali. I am pretty familiar with the BASH language, as that's the default shell for debian. Now, I've made this... (16 Replies)
Discussion started by: Huitzilopochtli
16 Replies

3. Solaris

Passwd -l or -u modifies lastchg field in /etc/shadow file

Hi, I have a Solaris 10 box where password aging is not functioning properly. Using the passwd command with the -l or -u options causes the lastchg field in the /etc/shadow file to be modified. Therefore, if a user's password is set to expire in 90 days and they are 1 day away, all they have... (4 Replies)
Discussion started by: cschar
4 Replies

4. UNIX for Dummies Questions & Answers

Knowing when a different program modifies a file

so i was testing something on a test box running linux. i manually vi'ed the /var/log/messages file. and i noticed, the file immediately stopped being updated. it wasn't until i restarted the syslog process that events started being recorded in it again. so that tells me, the syslog process... (20 Replies)
Discussion started by: SkySmart
20 Replies

5. Programming

SFTP fails from crontab but works from terminal

Dear community, I'm driving crazy with a strange issue. I have a simple script to transfer a file to a remote system:#!/bin/bash echo "put /tmp/server.log" > /tmp/server1_transfer.sftp sftp -b /tmp/server1_transfer.sftp user@10.99.1.2:Between client and server there is a SSH KEY, so if I run... (15 Replies)
Discussion started by: Lord Spectre
15 Replies

6. Emergency UNIX and Linux Support

Is there any way to set the files modified date and stamp to last modifies time?

Actually i did modification in a file on server by mistake, now its showing current time stamp, is there any way to set the files modified date and stamp to last modifies time. Please advice here.Thanks in advance.:b: (7 Replies)
Discussion started by: saluja.deepak
7 Replies

7. UNIX for Dummies Questions & Answers

Gnuplot wxt terminal vs x11 terminal

Hi, I installed ubuntu recently on my pc. And I installed gnuplot as well. When I first started working with gnuplot it was working . I did a plot and when I wanted to fit my data something happened and not the default terminal of gnuplot is xwt! I changed it to: set terminal x11, but it... (0 Replies)
Discussion started by: cosmologist
0 Replies

8. UNIX for Advanced & Expert Users

Pseudo-terminal will not be allocated because stdin is not a terminal.

I am trying to automate a SSH login using Keys using the following command ssh -i id_rsa usernamw@ipaddr. I am successful in doing this and i am getting the Warning Screen and I logon successfully. but when I am executing the command tail -1cf put.dat | ssh -i id_rsa username@ipaddr > get.dat ... (1 Reply)
Discussion started by: Shivdatta
1 Replies

9. Shell Programming and Scripting

Script that modifies root level files

I run a decent size Solaris 8 network where we use host files and no DNS servers. I have a master host file to push out to all the machines (also would like to do system and services too) but, the only way I've ever been able to do it is buy telneting into the machine and ftping the file into place... (10 Replies)
Discussion started by: turbo90awd
10 Replies

10. UNIX for Advanced & Expert Users

connecting to unix through hyper terminal - as a dumb terminal

I just changed from windows NT to XP and I am no longer able to connect to my unix system. I used to use hyper terminal -- which acts as dumb terminal to my main frame unix system. I think one of the options used to be "direct to comX". This option isn't listed now. I use a serial port and the... (2 Replies)
Discussion started by: michelle
2 Replies
Login or Register to Ask a Question