Adding User (Red Hat Enterprise Linux Server 5)

Microsoft.ACS.Linux.RHEL.5.Adding.User (Rule)

Rule to collect events for adding a new user

Element properties:

TargetMicrosoft.ACS.Linux.RHEL.5.ACSEndPoint
CategoryEventCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
EventDS DataSource Microsoft.Unix.SCXLog.Privileged.Datasource Default
WA WriteAction Microsoft.ACS.Unix.SecureEventLogWriter Default

Source Code:

<Rule ID="Microsoft.ACS.Linux.RHEL.5.Adding.User" Enabled="true" Target="Microsoft.ACS.Linux.RHEL.5.ACSEndPoint" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="EventDS" TypeID="Unix!Microsoft.Unix.SCXLog.Privileged.Datasource">
<Host>$Target/Host/Property[Type="Unix!Microsoft.Unix.Computer"]/NetworkName$</Host>
<LogFile>/var/log/secure</LogFile>
<!-- [TYPE] Redhat5 UserAdd True -->
<!-- [INPUT] Oct 14 19:07:55 scxom64-rhel52-03 useradd[12818]: new user: name=tempuser, UID=519, GID=519, home=/home/tempuser, shell=/bin/bash -->
<!-- [EXPECTED] date="Oct 14 19:07:55"; hostname="scxom64-rhel52-03"; process="useradd"; processId="12818"; clientUser="tempuser" -->
<RegExpFilter>\s+useradd\[[[:digit:]]+\]: new user: name=\S+,</RegExpFilter>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="ACS.Unix!Microsoft.ACS.Unix.SecureEventLogWriter">
<RegExp>(?'date'\S+\s+\d+\s+\d+:\d+:\d+)\s+(?:\S+:)?(?'hostname'\S+)\s+(?'process'useradd)\[(?'processId'\d+)\]: new user: name=(?'clientUser'\S+),</RegExp>
<EventType>1</EventType>
<EventId>27004</EventId>
<BackrefOverrides>sessionName="User added"</BackrefOverrides>
</WriteAction>
</WriteActions>
</Rule>