LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 08-23-2004, 04:25 AM   #1
praveenv
Member
 
Registered: Aug 2004
Location: India
Posts: 54

Rep: Reputation: 15
/var/log/wtmp


Which process/service is responsible for writing into the above file ?
 
Old 08-23-2004, 04:30 AM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
From the wtmp man page (man wtmp):
Quote:
wtmp is maintained by login(1), init(1), and some versions of getty(1). Neither of these programs creates the file, so if it is removed, record-keeping is turned off.
 
Old 08-23-2004, 04:46 AM   #3
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi

can u plaese specify ur purpose for finding out the process of writing to wtmp

regards
 
Old 08-23-2004, 01:47 PM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
There's nothing special about wtmp. It's a file just like any other. You can write to it with a output redirection (such as echo "Test" >> /var/log/wtmp) or with a program you've written. All you need are the right permissions; meaning you will probably have to be root.

I would strongly recommend against it. The wtmp file contains a record of all logins and logouts. There's no reason to edit the file unless you've created a new way to login and logout that neither init or login can handle. This is a log file that many intruders want to edit to cover their tracks after breaking into a system. So unless you or whoever the system administrator is don't care about accurate record-keeping, then this file will likely only be writeable by root.
 
Old 08-23-2004, 03:30 PM   #5
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi
well it is surely bad idea to write to wtmp files
then too if u want to write to it u can do that by
some defined functions in C for UTMP

man setutent
will give u more info


regards
 
Old 08-23-2004, 03:48 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

http://www.linuxquestions.org/questi...hreadid=218643
http://www.linuxquestions.org/questi...hreadid=221234

Warning...
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
/var/log/wtmp mrant Linux - Security 4 07-14-2013 09:41 PM
/var/log/wtmp ??? fatrandy13 Linux - Software 3 12-13-2004 10:07 AM
cleaning up /var/adm/wtmp Risc91 AIX 5 08-23-2004 10:52 AM
Strange results in /var/log/apache/access.log subt13 Linux - Security 2 08-03-2004 02:21 PM
wierd characters in /var/log/wtmp mindfestival Linux - Newbie 2 04-22-2004 02:02 AM


All times are GMT -5. The time now is 08:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration