LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-18-2008, 02:12 AM   #1
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
unable to change timestamps on a file


I am attempting to backdate timestamps with touch as per this attempt

[root@gs gordy]# touch -a 200801181640.57 -m 200801181640.57 honeytoken.txt
[root@gs gordy]# stat honeytoken.txt
File: `honeytoken.txt'
Size: 4 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 100676311 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 500/ gordy) Gid: ( 500/ gordy)
Access: 2008-01-18 17:05:46.059281539 +0900
Modify: 2008-01-18 17:05:46.059281539 +0900
Change: 2008-01-18 17:05:46.059281539 +0900

according to my Distro Mdv it wants
yyyy mm dd (4digit24hour) . second
2008 01 18 1640 (=4:40pm) . 57 seconds


Can anyone see where I am going wrong. If I am not going wrong then my distro is more secured than I thought!!!

any assistance would be appreciated. I have read man touch and tried an old way of running timestamp
mmddhhmmyy but it complained.
 
Old 01-18-2008, 03:26 AM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Try with the syntax I've tested on my box.
 
Old 01-18-2008, 04:41 AM   #3
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Original Poster
Rep: Reputation: Disabled
yeah thanks for that format, dunno why mine failed oh well here is atime and mtime

[gordy@gs ~]$ stat honeytoken.txt
File: `honeytoken.txt'
Size: 4 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 100676311 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 500/ gordy) Gid: ( 500/ gordy)
Access: 2008-01-18 16:40:57.000000000 +0900
Modify: 2008-01-18 17:05:46.059281000 +0900
Change: 2008-01-18 19:30:04.489802652 +0900

[gordy@gs ~]$ touch -a --date="2008-01-18 16:40:57 +0900" -c --date="2008-01-18 16:40:57 +0900" honeytoken.txt
[gordy@gs ~]$ stat honeytoken.txt
File: `honeytoken.txt'
Size: 4 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 100676311 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 500/ gordy) Gid: ( 500/ gordy)
Access: 2008-01-18 16:40:57.000000000 +0900
Modify: 2008-01-18 16:40:57.000000000 +0900
Change: 2008-01-18 19:32:52.992344718 +0900




Question?

How do we backdate the change time? I tried (blindly) a -c switch and no good


Question (2) if change time can not be backdated, (I hope) can we use stat to detect the change, in which case your proposal on the other thread may be averted?

I am really hoping this is true as man touch has no change time AFAIK and page 34 Linux Desk Reference has not change time flag either.

To be blunt, the honeytoken will still work...but maybe not thru Tripwire but thru stat?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
change vfat timestamps jhwilliams Linux - General 2 09-12-2007 11:58 PM
no file access timestamps being updated! takahaya Linux - General 4 04-03-2005 06:48 PM
unable to change file permissions!! dcdbutler Linux - General 11 02-06-2005 09:58 AM
VSFTPD and file timestamps t3___ Linux - Newbie 4 01-21-2004 02:26 PM
converting log file timestamps mrtwice Linux - Software 3 09-22-2003 09:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration