Sponsored Content
Top Forums Shell Programming and Scripting Script to update rsyslog.conf and auditd.conf Post 302997749 by Mide on Thursday 18th of May 2017 10:48:27 PM
Old 05-18-2017
Question Script to update rsyslog.conf and auditd.conf

Hello all,

Newbie here.

I'm currently tasked with updating rsyslog.conf and auditd.conf on a large set of servers. I know the exact logging configurations that I want to enable. I have updated both files on on a server and hope to use the updated files as a template for the rest of the servers. I reckon that a script which will :
reference the "templates"
copy/replace the existing rsyslog.conf and auditd.conf
restart rsyslog service

will suffice.However, I have not really played around with any form of scripting at least in *NIX. The set of servers are a mix of Redhat, Amazon Linux, Suse, and Ubuntu with Redhat 6 the majority. I figured that I can at least make it work on Redhat and modify as needed for the others.Can you please help me out?

Regards,

Mide.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell/Perl Script to edit dhcpd.conf

Hi, I need to get a script together to edit the dhcp service configuration file dhcpd.conf. Mac addresses are defined in classes ex. class "HOST1" { match if substring (hardware, 1,18)=00:11:11:FF:FF:FF;} class "HOST2" ... class "HOST3" ... ... followed by allow or deny statements:... (4 Replies)
Discussion started by: sahilb
4 Replies

2. Solaris

Script for turning processes in etc/inetd.conf on and off

Anyone have a perl script that can be run via a web browser to turn ftp or telnet on and off in etc/inetd.conf ? Believe it or not but I ride a motorcycle a lot in the summer and carry a laptop in my saddlebags to connect from almost anywhere via Verizon alongside the highway. However, have too... (0 Replies)
Discussion started by: thomi39
0 Replies

3. UNIX for Advanced & Expert Users

Configuring snmpd.conf and snmptrapd.conf

HI, I want a help for Configuring snmpd.conf and snmptrapd.conf (i.e Configuring SNMP) for receiving TRAPS in my networks. I am using RHEL4.0 OS. Please tell me How I can configure above two files in a proper way and at an advanced level. Especially I am getting... (2 Replies)
Discussion started by: jagdish.machhi@
2 Replies

4. Red Hat

SD.conf and LPFC.conf

What would be Redhat RHEL 4.0 equivalent for Solaris sd.conf and lpfc.conf? What are the files called and where are the files located? (1 Reply)
Discussion started by: soupbone38
1 Replies

5. Solaris

basic question on sd.conf and lpc.conf file

Hello Guys, Do we need to configure this file only if we add SAN disk or even if we add local disk, do we need to modify? (4 Replies)
Discussion started by: mokkan
4 Replies

6. Shell Programming and Scripting

Change values in .conf file with a script

This is my first time posting here...so be gentle. Suppose I have a test.conf file that contains a value such as a IP. I would like to be able to use the Dialog Utility in Linux to allow me to enter the new IP in a Dialog form...and the results get saved into the test.conf file in the place... (4 Replies)
Discussion started by: calahanp
4 Replies

7. Shell Programming and Scripting

Shell Script to check dhcp conf file

Hi, I have to prepare a script to check the dhcp conf file. The script has to check for a specific parameter called circuit ID. If the Circuit ID is unique it should show the output that it is unique and if it is duplicate it should show that the Circuit ID is duplicate. I have prepared the... (4 Replies)
Discussion started by: Crazy_Nix
4 Replies

8. Solaris

Configure resolv.conf and nsswitch.conf

Hi, I've installed Solaris 11.3(live media) and configured DNS. Everytime I reboot the server, resolv.conf got deleted and it created a new nsswitch.conf. I used below to configure both settings: # svccfg -s dns/client svc:/network/dns/client> setprop config/nameserver = (xx.xx.xx.aa... (1 Reply)
Discussion started by: flexihopper18
1 Replies
AUDITD(8)						  System Administration Utilities						 AUDITD(8)

NAME
auditd - The Linux Audit daemon SYNOPSIS
auditd [-f] [-l] [-n] [-s disable|enable|nochange] DESCRIPTION
auditd is the userspace component to the Linux Auditing System. It's responsible for writing audit records to the disk. Viewing the logs is done with the ausearch or aureport utilities. Configuring the audit rules is done with the auditctl utility. During startup, the rules in /etc/audit/audit.rules are read by auditctl and loaded into the kernel. Alterately, there is also an augenrules program that reads rules located in /etc/audit/rules.d/ and compiles them into an audit.rules file. The audit daemon itself has some configuration options that the admin may wish to customize. They are found in the auditd.conf file. OPTIONS
-f leave the audit daemon in the foreground for debugging. Messages also go to stderr rather than the audit log. -l allow the audit daemon to follow symlinks for config files. -n no fork. This is useful for running off of inittab or systemd. -s=ENABLE_STATE specify when starting if auditd should change the current value for the kernel enabled flag. Valid values for ENABLE_STATE are "dis- able", "enable" or "nochange". The default is to enable (and disable when auditd terminates). The value of the enabled flag may be changed during the lifetime of auditd using 'auditctl -e'. SIGNALS
SIGHUP causes auditd to reconfigure. This means that auditd re-reads the configuration file. If there are no syntax errors, it will proceed to implement the requested changes. If the reconfigure is successful, a DAEMON_CONFIG event is recorded in the logs. If not success- ful, error handling is controlled by space_left_action, admin_space_left_action, disk_full_action, and disk_error_action parameters in auditd.conf. SIGTERM caused auditd to discontinue processing audit events, write a shutdown audit event, and exit. SIGUSR1 causes auditd to immediately rotate the logs. It will consult the max_log_size_action to see if it should keep the logs or not. SIGUSR2 causes auditd to attempt to resume logging. This is usually needed after logging has been suspended. FILES
/etc/audit/auditd.conf - configuration file for audit daemon /etc/audit/audit.rules - audit rules to be loaded at startup /etc/audit/rules.d/ - directory holding individual sets of rules to be compiled into one file by augenrules. NOTES
A boot param of audit=1 should be added to ensure that all processes that run before the audit daemon starts is marked as auditable by the kernel. Not doing that will make a few processes impossible to properly audit. The audit daemon can receive audit events from other audit daemons via the audisp-remote audispd plugin. The audit daemon may be linked with tcp_wrappers to control which machines can connect. If this is the case, you can add an entry to hosts.allow and deny. SEE ALSO
auditd.conf(5), audispd(8), ausearch(8), aureport(8), auditctl(8), augenrules(8), audit.rules(7). AUTHOR
Steve Grubb Red Hat Sept 2013 AUDITD(8)
All times are GMT -4. The time now is 07:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy