Bug 35575

Summary: Pw(8) man page makes no mention of /var/log/userlog
Product: Documentation Reporter: Daniel Howard <dannyman>
Component: Books & ArticlesAssignee: Tom Rhodes <trhodes>
Status: Closed FIXED    
Severity: Affects Only Me CC: dannyman
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Daniel Howard 2002-03-06 03:20:01 UTC
Apparently, there's this really nice log that pw keeps, in
/var/log/userlog.  There is absolutely no mention of this functionality
in the pw man page.

This would be very useful information for a SysAdmin who bothers to read
the pw man page to know. :)

Fix: 

At least mention /var/log/userlog in FILES.  It may be useful to
document the any relevant syslog information as well.

If nobody wants to "own" fixing this, then I'll roll up my sleeves, do
some research, and supply patches.

-danny
Comment 1 fullermd 2002-03-09 10:21:55 UTC
On Tue, Mar 05, 2002 at 07:10:32PM -0800 I heard the voice of
dannyman@toldme.com, and lo! it spake thus:
> 	
> >Fix:
> 
> At least mention /var/log/userlog in FILES.  It may be useful to
> document the any relevant syslog information as well.
> 
> If nobody wants to "own" fixing this, then I'll roll up my sleeves, do
> some research, and supply patches.

Well, I can't "own" it, but I can supply patches   :)

syslog isn't involved, it logs directly.  How about this:


Index: pw.8
===================================================================
RCS file: /usr/cvs/src/usr.sbin/pw/pw.8,v
retrieving revision 1.25
diff -u -r1.25 pw.8
--- pw.8	2001/07/15 08:02:41	1.25
+++ pw.8	2002/03/09 10:20:05
@@ -884,6 +884,14 @@
 .Xr fingerd 8 ,
 and a small number of TCP/IP clients, such as IRC, where full names
 specified in the passwd file may be used by default.
+.Pp
+.Nm Pw
+logs actions to the
+.Pa /var/log/userlog
+file when actions such as user or group additions or deletions occur.
+The location of this logfile can be changed in the
+.Xr pw.conf 5
+file.
 .Sh FILES
 .Bl -tag -width /etc/master.passwd.new -compact
 .It Pa /etc/master.passwd
@@ -902,6 +910,8 @@
 Temporary copy of the group file
 .It Pa /etc/pw.conf
 Pw default options file
+.It Pa /var/log/userlog
+User/group modification logfile
 .El
 .Sh SEE ALSO
 .Xr chpass 1 ,



-- 
Matthew Fuller     (MF4839)     |    fullermd@over-yonder.net
Unix Systems Administrator      |    fullermd@futuresouth.com
Specializing in FreeBSD         |    http://www.over-yonder.net/

"The only reason I'm burning my candle at both ends, is because I
      haven't figured out how to light the middle yet"
Comment 2 Dima Dorfman 2002-03-27 02:10:11 UTC
dannyman@toldme.com wrote:
> Apparently, there's this really nice log that pw keeps, in
> /var/log/userlog.  There is absolutely no mention of this functionality
> in the pw man page.
> 
> This would be very useful information for a SysAdmin who bothers to read
> the pw man page to know. :)

This functionality is described in pw.conf(5).  Many of pw(8)'s
features are only described there (and not in pw(8)), and I don't see
why this should be an exception.  Perhaps the existence of pw.conf(5)
should be made more obvious somehow.
Comment 3 Daniel Howard 2002-03-27 03:08:23 UTC
On Wed, Mar 27, 2002 at 02:10:11AM +0000, Dima Dorfman wrote:
> This functionality is described in pw.conf(5).  Many of pw(8)'s
> features are only described there (and not in pw(8)), and I don't see
> why this should be an exception.  Perhaps the existence of pw.conf(5)
> should be made more obvious somehow.

Well, in pw(8) there is a list of 9 files that pw uses to go about its
business.  Even temporary files are documented.  One would expect if so
many files are listed, but no log file is mentioned, that there is no
log file.

Pw.conf(5) on the other hand, lists four files, with no descriptions,
and does not mention the log in the files section.

Also, at least as of 4.5-RELEASE, the default log file is not mentioned
in pw.conf(5) either.  The logfile config is mentioned, but no default
value is specified.  The logical conclusion being that if you want pw to
log anything, you need to explicitly spell it out, although it has
already been logging to the unobviously-named /var/log/userlog all
along!

-danny
Comment 4 fullermd 2002-12-09 04:14:30 UTC
[Keepalive]

This would seem to have just sorta disappeared into the aether; the
manpage still makes no reference.  The patch supplied is out of date now,
though cvs update had no trouble merging the conflicts.  Could somebody
stuff this in because 5.0 is cut?

Here's an updated patch:
Index: pw.8
===================================================================
RCS file: /usr/cvs/src/usr.sbin/pw/pw.8,v
retrieving revision 1.31
diff -u -r1.31 pw.8
--- pw.8        14 Jul 2002 14:45:10 -0000      1.31
+++ pw.8        9 Dec 2002 04:12:14 -0000
@@ -912,6 +912,14 @@
 .Xr fingerd 8 ,
 and a small number of TCP/IP clients, such as IRC, where full names
 specified in the passwd file may be used by default.
+.Pp
+.Nm Pw
+logs actions to the
+.Pa /var/log/userlog
+file when actions such as user or group additions or deletions occur.
+The location of this logfile can be changed in the
+.Xr pw.conf 5
+file.
 .Sh FILES
 .Bl -tag -width /etc/master.passwd.new -compact
 .It Pa /etc/master.passwd
@@ -930,6 +938,8 @@
 Temporary copy of the group file
 .It Pa /etc/pw.conf
 Pw default options file
+.It Pa /var/log/userlog
+User/group modification logfile
 .El
 .Sh SEE ALSO
 .Xr chpass 1 ,




-- 
Matthew Fuller     (MF4839)   |  fullermd@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/

"The only reason I'm burning my candle at both ends, is because I
      haven't figured out how to light the middle yet"
Comment 5 simon 2003-05-07 02:01:07 UTC
I think it would be a really god idea to add this information
to the man page. I have a slightly different patch :

Changes to last patch in this PR:

Use "The pw utility logs" instead of "Pw logs". Looks better IMO and is
the way it is done the other places in this man page.

Change "...in the pw.conf(5) file." to "...in pw.conf(5).". Thats
the way I have seen references to files which have a man page
in other man pages.

Both nitpicking of course but...

%%%
Index: pw.8
===================================================================
RCS file: /home/ncvs/src/usr.sbin/pw/pw.8,v
retrieving revision 1.32
diff -u -d -u -r1.32 pw.8
--- pw.8	12 Dec 2002 17:26:03 -0000	1.32
+++ pw.8	7 May 2003 00:45:04 -0000
@@ -912,6 +912,14 @@
 .Xr fingerd 8 ,
 and a small number of TCP/IP clients, such as IRC, where full names
 specified in the passwd file may be used by default.
+.Pp
+The
+.Nm
+utility logs actions to the
+.Pa /var/log/userlog
+file when actions such as user or group additions or deletions occur.
+The location of this logfile can be changed in
+.Xr pw.conf 5 .
 .Sh FILES
 .Bl -tag -width /etc/master.passwd.new -compact
 .It Pa /etc/master.passwd
@@ -930,6 +938,8 @@
 Temporary copy of the group file
 .It Pa /etc/pw.conf
 Pw default options file
+.It Pa /var/log/userlog
+User/group modification logfile
 .El
 .Sh SEE ALSO
 .Xr chpass 1 ,
%%%

-- 
Simon L. Nielsen
Comment 6 fullermd 2003-05-07 03:28:27 UTC
On Tue, May 06, 2003 at 06:10:06PM -0700 I heard the voice of
Simon L. Nielsen, and lo! it spake thus:
> 
>  I think it would be a really god idea to add this information
>  to the man page. I have a slightly different patch :
>  
>  Changes to last patch in this PR:

These changes look good to me.  Looking at it, I dunno what I was
thinking anyway...

Of course, still needs somebody with Puff the Magic Commit Bit   8-)


-- 
Matthew Fuller     (MF4839)   |  fullermd@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/

"The only reason I'm burning my candle at both ends, is because I
      haven't figured out how to light the middle yet"
Comment 7 Tom Rhodes freebsd_committer freebsd_triage 2003-05-08 01:29:33 UTC
State Changed
From-To: open->patched

Patch applied with a slight modification.  Thanks for the submission. 


Comment 8 Tom Rhodes freebsd_committer freebsd_triage 2003-05-08 01:29:33 UTC
Responsible Changed
From-To: freebsd-doc->trhodes

Over to me, MFC reminder.
Comment 9 Tom Rhodes freebsd_committer freebsd_triage 2003-05-08 16:02:02 UTC
State Changed
From-To: patched->closed

MFC Complete.  Thanks for the submission.