152267f74SRobert Watson.\" Copyright (c) 2004 Apple Inc. 2ca0716f5SRobert Watson.\" All rights reserved. 3ca0716f5SRobert Watson.\" 4ca0716f5SRobert Watson.\" Redistribution and use in source and binary forms, with or without 5ca0716f5SRobert Watson.\" modification, are permitted provided that the following conditions 6ca0716f5SRobert Watson.\" are met: 7ca0716f5SRobert Watson.\" 1. Redistributions of source code must retain the above copyright 8ca0716f5SRobert Watson.\" notice, this list of conditions and the following disclaimer. 9ca0716f5SRobert Watson.\" 2. Redistributions in binary form must reproduce the above copyright 10ca0716f5SRobert Watson.\" notice, this list of conditions and the following disclaimer in the 11ca0716f5SRobert Watson.\" documentation and/or other materials provided with the distribution. 1252267f74SRobert Watson.\" 3. Neither the name of Apple Inc. ("Apple") nor the names of 13ca0716f5SRobert Watson.\" its contributors may be used to endorse or promote products derived 14ca0716f5SRobert Watson.\" from this software without specific prior written permission. 15ca0716f5SRobert Watson.\" 16ca0716f5SRobert Watson.\" THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND 17ca0716f5SRobert Watson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18ca0716f5SRobert Watson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19ca0716f5SRobert Watson.\" ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR 20ca0716f5SRobert Watson.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21ca0716f5SRobert Watson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22ca0716f5SRobert Watson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23ca0716f5SRobert Watson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 24ca0716f5SRobert Watson.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 25ca0716f5SRobert Watson.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26ca0716f5SRobert Watson.\" POSSIBILITY OF SUCH DAMAGE. 27ca0716f5SRobert Watson.\" 28c74c7b73SRobert Watson.Dd January 4, 2008 29ca0716f5SRobert Watson.Dt AUDIT_USER 5 30ca0716f5SRobert Watson.Os 31ca0716f5SRobert Watson.Sh NAME 32ca0716f5SRobert Watson.Nm audit_user 33bc168a6cSRobert Watson.Nd "events to be audited for given users" 34ca0716f5SRobert Watson.Sh DESCRIPTION 35ca0716f5SRobert WatsonThe 36ca0716f5SRobert Watson.Nm 37ca0716f5SRobert Watsonfile specifies which audit event classes are to be audited for the given users. 38ca0716f5SRobert WatsonIf specified, these flags are combined with the system-wide audit flags in the 39bc168a6cSRobert Watson.Xr audit_control 5 40ca0716f5SRobert Watsonfile to determine which classes of events to audit for that user. 41ca0716f5SRobert WatsonThese settings take effect when the user logs in. 42ca0716f5SRobert Watson.Pp 43ca0716f5SRobert WatsonEach line maps a user name to a list of classes that should be audited and a 44ca0716f5SRobert Watsonlist of classes that should not be audited. 4523bf6e20SRobert WatsonEntries are of the form: 4623bf6e20SRobert Watson.Pp 47bc168a6cSRobert Watson.D1 Ar username Ns : Ns Ar alwaysaudit Ns : Ns Ar neveraudit 4823bf6e20SRobert Watson.Pp 4923bf6e20SRobert WatsonIn the format above, 50bc168a6cSRobert Watson.Ar alwaysaudit 51ca0716f5SRobert Watsonis a set of event classes that are always audited, and 52bc168a6cSRobert Watson.Ar neveraudit 53ca0716f5SRobert Watsonis a set of event classes that should not be audited. 54ca0716f5SRobert WatsonThese sets can indicate 55ca0716f5SRobert Watsonthe inclusion or exclusion of multiple classes, and whether to audit successful 56ca0716f5SRobert Watsonor failed events. 57ca0716f5SRobert WatsonSee 58ca0716f5SRobert Watson.Xr audit_control 5 59ca0716f5SRobert Watsonfor more information about audit flags. 60ca0716f5SRobert Watson.Pp 61ca0716f5SRobert WatsonExample entries in this file are: 62ca0716f5SRobert Watson.Bd -literal -offset indent 63ca0716f5SRobert Watsonroot:lo,ad:no 64ca0716f5SRobert Watsonjdoe:-fc,ad:+fw 65ca0716f5SRobert Watson.Ed 66ca0716f5SRobert Watson.Pp 6723bf6e20SRobert WatsonThese settings would cause login/logout and administrative events that 68c74c7b73SRobert Watsonare performed on behalf of user 69bc168a6cSRobert Watson.Dq Li root 70bc168a6cSRobert Watsonto be audited. 71ca0716f5SRobert WatsonNo failure events are audited. 72ca0716f5SRobert WatsonFor the user 73bc168a6cSRobert Watson.Dq Li jdoe , 74ca0716f5SRobert Watsonfailed file creation events are audited, administrative events are 75ca0716f5SRobert Watsonaudited, and successful file write events are never audited. 76bc168a6cSRobert Watson.Sh IMPLEMENTATION NOTES 77bc168a6cSRobert WatsonPer-user and global audit preselection configuration are evaluated at time of 78bc168a6cSRobert Watsonlogin, so users must log out and back in again for audit changes relating to 79bc168a6cSRobert Watsonpreselection to take effect. 80bc168a6cSRobert Watson.Pp 81bc168a6cSRobert WatsonAudit record preselection occurs with respect to the audit identifier 82bc168a6cSRobert Watsonassociated with a process, rather than with respect to the UNIX user or group 83bc168a6cSRobert WatsonID. 84bc168a6cSRobert WatsonThe audit identifier is set as part of the user credential context as part of 85bc168a6cSRobert Watsonlogin, and typically does not change as a result of running setuid or setgid 86bc168a6cSRobert Watsonapplications, such as 87bc168a6cSRobert Watson.Xr su 1 . 88bc168a6cSRobert WatsonThis has the advantage that events that occur after running 89bc168a6cSRobert Watson.Xr su 1 90bc168a6cSRobert Watsoncan be audited to the original authenticated user, as required by CAPP, but 91bc168a6cSRobert Watsonmay be surprising if not expected. 92ca0716f5SRobert Watson.Sh FILES 93bc168a6cSRobert Watson.Bl -tag -width ".Pa /etc/security/audit_user" -compact 94ca0716f5SRobert Watson.It Pa /etc/security/audit_user 95ca0716f5SRobert Watson.El 96ca0716f5SRobert Watson.Sh SEE ALSO 97bc168a6cSRobert Watson.Xr login 1 , 98bc168a6cSRobert Watson.Xr su 1 , 99bc168a6cSRobert Watson.Xr audit 4 , 100bc168a6cSRobert Watson.Xr audit_class 5 , 101bc168a6cSRobert Watson.Xr audit_control 5 , 102bc168a6cSRobert Watson.Xr audit_event 5 103bc168a6cSRobert Watson.Sh HISTORY 104bc168a6cSRobert WatsonThe OpenBSM implementation was created by McAfee Research, the security 105bc168a6cSRobert Watsondivision of McAfee Inc., under contract to Apple Computer Inc.\& in 2004. 106bc168a6cSRobert WatsonIt was subsequently adopted by the TrustedBSD Project as the foundation for 107bc168a6cSRobert Watsonthe OpenBSM distribution. 108ca0716f5SRobert Watson.Sh AUTHORS 109bc168a6cSRobert Watson.An -nosplit 110ca0716f5SRobert WatsonThis software was created by McAfee Research, the security research division 111ca0716f5SRobert Watsonof McAfee, Inc., under contract to Apple Computer Inc. 112bc168a6cSRobert WatsonAdditional authors include 113bc168a6cSRobert Watson.An Wayne Salamon , 114bc168a6cSRobert Watson.An Robert Watson , 115bc168a6cSRobert Watsonand SPARTA Inc. 116ca0716f5SRobert Watson.Pp 117ca0716f5SRobert WatsonThe Basic Security Module (BSM) interface to audit records and audit event 118ca0716f5SRobert Watsonstream format were defined by Sun Microsystems. 119