lastcomm cannot find /var/account/pacct
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Acct |
Invalid
|
Undecided
|
Unassigned | ||
acct (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Maverick |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: acct
SRU JUSTIFICATION:
Without changes, acct reporting utilities are unusable with their default use without parameters; since they expect a data file in an incorrect path. The patch is minimal and with low impact (just path changes for default filenames).
TEST CASES:
1) install acct
2) run a few commands, such as 'ls', 'cat', etc. (even doing nothing after installing may be sufficient depending on the shell)
3) run 'sa' or 'lastcomm'
With this patch, 'sa' and 'lastcomm' should output reports of the last commands used. Without the patch, they should complain about a missing pacct file under '/var/account/
---
Default install of acct package doesn't enable "lastcomm" to work:
<PRE>
# apt-get install acct
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
acct
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 111kB of archives.
After this operation, 360kB of additional disk space will be used.
Get:1 http://
0% [1 acct 0B/111kB 0%]
Fetched 111kB in 0s (115kB/s)
Selecting previously deselected package acct.
(Reading database ... 125574 files and directories currently installed.)
Unpacking acct (from .../acct_
Processing triggers for doc-base ...
Processing 1 added doc-base file(s)...
Registering documents with scrollkeeper...
Processing triggers for install-info ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up acct (6.5.4-2ubuntu1) ...
Turning on process accounting, file set to '/var/log/
* Done.
# lastcomm
couldn't open file '/var/account/
# ls -l /var/account
ls: cannot access /var/account: No such file or directory
# ln -s log/account /var/account
# lastcomm
bash F root pts/0 0.00 secs Fri Nov 19 00:54
ln root pts/0 0.00 secs Fri Nov 19 00:54
bash F root pts/0 0.00 secs Fri Nov 19 00:54
ls root pts/0 0.00 secs Fri Nov 19 00:54
bash F root pts/0 0.00 secs Fri Nov 19 00:54
lastcomm root pts/0 0.00 secs Fri Nov 19 00:54
bash F root pts/0 0.00 secs Fri Nov 19 00:54
lastcomm root pts/0 0.00 secs Fri Nov 19 00:54
[...etc...]
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: acct 6.5.4-2ubuntu1
ProcVersionSign
Uname: Linux 2.6.35-22-generic x86_64
Architecture: amd64
Date: Sat Nov 27 14:07:58 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
LC_CTYPE=
LC_COLLATE=C
PATH=(custom, user)
LANG=C
SHELL=/bin/bash
SourcePackage: acct
Related branches
- Bryce Harrington: Approve
- Artur Rona (community): Approve
-
Diff: 40 lines (+10/-1)3 files modifieddebian/changelog (+8/-0)
debian/control (+1/-1)
debian/rules (+1/-0)
***FIX INCLUDED***
This appears to actually be a result of the default accounting file path being /var/log/account instead of /var/account. I looked at the source, and it appears that the configure code for setting the default file location is simply not working. The config check looking for the file includes a C program that appears to work as I copied it out into a blah.c and compiled and ran it. However, the configure is not picking up the options for WTMP_FILE_LOC, ACCT_FILE_LOC, SAVACCT_FILE_LOC, and USRACCT_FILE_LOC.
***The Fix***
I have found that simply regenerating the configure script with autoconf fixes this issue with the build.
***End of the Fix***