gone - no logout

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

gone - no logout

Russell Coker
Currently if a user is logged in while logrotate renames the /var/log/wtmp
file then the command "last -i -f /var/log/wtmp.1" will give a result such as
the following:
root     pts/0        10.0.0.1         Fri Jan 16 13:17    gone - no logout

Also the command "last -i" will not display anything about the user in
question (it will disregard the end entry).

Would it hurt to have a duplicate start entry in a wtmp file?  If not then is
there any reason not to duplicate the entries from sessions in progress from
the wtmp.1 file to the wtmp file so that "last" will display all sessions
completely?

--
[hidden email]
http://etbe.coker.com.au/          My Main Blog
http://doc.coker.com.au/           My Documents Blog


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: gone - no logout

Bernd Eckenfels
In article <[hidden email]> you wrote:
> Would it hurt to have a duplicate start entry in a wtmp file?  If not then is
> there any reason not to duplicate the entries from sessions in progress from
> the wtmp.1 file to the wtmp file so that "last" will display all sessions
> completely?

Another option would be to have at least a "rotated" entry (like the reboot
entries). But its most likely easier to just not rotate the files in normal
operation.

Gruss
Bernd


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: gone - no logout

Russell Coker
On Tue, 27 Jan 2009, Bernd Eckenfels <[hidden email]> wrote:
> In article <[hidden email]> you wrote:
> > Would it hurt to have a duplicate start entry in a wtmp file?  If not
> > then is there any reason not to duplicate the entries from sessions in
> > progress from the wtmp.1 file to the wtmp file so that "last" will
> > display all sessions completely?
>
> Another option would be to have at least a "rotated" entry (like the reboot
> entries). But its most likely easier to just not rotate the files in normal
> operation.

For small servers not rotating the wtmp file is easier.  When running servers
that get a few hundred K per month you could have 10 years of wtmp history in
a single file without problems.

I'm sure that there are large servers where rotating the wtmp file is
required.  The question is what the default should be, given that the number
of machines which get large wtmp files is very small it seems reasonable to
make a default that works well for small systems.

--
[hidden email]
http://etbe.coker.com.au/          My Main Blog
http://doc.coker.com.au/           My Documents Blog


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: gone - no logout

Russell Coker
On Mon, 2 Feb 2009, Peter Palfrader <[hidden email]> wrote:
> Why not simply rotate based on log file size by default?

This sounds like a good idea.  The version of logrotate in Lenny even has
a "size" option in it's config file format to support this.

A default of 100M sounds reasonable.

It's a pity that logrotate has no "yearly" option (according to the man page).

I'll file a bug report.

--
[hidden email]
http://etbe.coker.com.au/          My Main Blog
http://doc.coker.com.au/           My Documents Blog


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]