How to Modify auditd Rules in Immutable Mode and Resolve... (2024)

This document (000021038) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12

Situation

When trying to load a new rule in auditd using the auditctl command, you may encounter an error stating that the audit system is in immutable mode and no rule changes are allowed. This is because auditd is set to immutable mode, which prevents adding or modifying rules.

# auditctl -a always,exit -F dir=/home -F perm=war -k file_delThe audit system is in immutable mode, no rule changes allowed

Resolution

Follow the steps outlined in the Diagnostic Steps section for assistance with the issue.

  • To add a permanent auditd rule, you can follow these steps:
    • Create a rule file under /etc/audit/rules.d/ directory, and reboot the server.
    • During the reboot, the auditd rules will be loaded, and the rule with the immutable flag should be set as the last rule.
# auditctl -a always,exit -F dir=/home -F perm=war -k file_delThe audit system is in immutable mode, no rule changes allowed# auditctl -lNo rules# vi /etc/audit/rules.d/audit.rules<add rule># grep file_del /etc/audit/rules.d/audit.rules-a always,exit -F dir=/home -F perm=war -k file_del# reboot<reboot># auditctl -l-a always,exit -F dir=/home -F perm=war -k file_del#
  • If you want to disable the immutable flag and add a rule at runtime, follow these steps:
    • locate the file where the immutable flag is set under /etc/audit/rules.d/ directory, delete the entry, reboot the server, and then add the runtime rule.
# auditctl -a always,exit -F dir=/home -F perm=war -k file_delThe audit system is in immutable mode, no rule changes allowed# auditctl -lNo rules# grep -r "\-e 2" /etc/audit/rules.d/*/etc/audit/rules.d/audit.rules:-e 2# vi /etc/audit/rules.d/audit.rules<remove entry># grep -r "\-e 2" /etc/audit/rules.d/*# # reboot<reboot># auditctl -lNo rules# auditctl --a always,exit -F dir=/home -F perm=war -k file_del# auditctl -l-w /tmp/test -p rwa -k monitor-test#

Cause

From man auditctl

-e [0..2] Set enabled flag. When 0 is passed, this can be used to temporarily disable auditing.When 1 is passed as an argument, it will enable auditing.To lock the audit configuration so that it can’t be changed, pass a 2 as the argument.Locking the configuration is intended to be the last command in audit.rules for anyone wishing this feature to be active.Any attempt to change the configuration in this mode will be audited and denied.The configuration can only be changed by rebooting the machine.

Additional Information

  • A rule has been configured under the directory /etc/audit/rules.d/ to set the immutable flag permanently.
# grep "\-e 2" /etc/audit/rules.d/*/etc/audit/rules.d/audit.rules:-e 2/etc/audit/rules.d/audit.rules-04042023:-e 2/etc/audit/rules.d/audit.rules.bkp:-e 2/etc/audit/rules.d/audit.rules.bkp_2022-10-23:-e 2/etc/audit/rules.d/audit.rules.bkp_2022-11-25:-e 2

In the above example, the immutable flag was included in the file named /etc/audit/rules.d/audit.rules.

  • The immutable flag has been configured through the command line.
 # auditctl -senabled 2failure 1pid 30934

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021038
  • Creation Date: 10-Apr-2023
  • Modified Date:11-Apr-2023
    • SUSE Linux Enterprise Server
    • SUSE Linux Enterprise Server for SAP Applications

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

How to Modify auditd Rules in Immutable Mode and Resolve... (2024)
Top Articles
What are some examples of opportunities?
How to Withdraw Money From EXMO - Zengo
AMC Theatre - Rent A Private Theatre (Up to 20 Guests) From $99+ (Select Theaters)
Uti Hvacr
Live Basketball Scores Flashscore
Affidea ExpressCare - Affidea Ireland
Jeremy Corbell Twitter
30% OFF Jellycat Promo Code - September 2024 (*NEW*)
Corpse Bride Soap2Day
Dark Souls 2 Soft Cap
Progressbook Brunswick
Oxford House Peoria Il
Craigslist Malone New York
Money blog: Domino's withdraws popular dips; 'we got our dream £30k kitchen for £1,000'
Transfer and Pay with Wells Fargo Online®
iZurvive DayZ & ARMA Map
Joann Ally Employee Portal
Teacup Yorkie For Sale Up To $400 In South Carolina
Veracross Login Bishop Lynch
Free Personals Like Craigslist Nh
Galaxy Fold 4 im Test: Kauftipp trotz Nachfolger?
Aliciabibs
Prep Spotlight Tv Mn
Tokyo Spa Memphis Reviews
Roanoke Skipthegames Com
27 Modern Dining Room Ideas You'll Want to Try ASAP
Pixel Combat Unblocked
Kuttymovies. Com
Storelink Afs
new haven free stuff - craigslist
Lowell Car Accident Lawyer Kiley Law Group
Giantess Feet Deviantart
Selfservice Bright Lending
Property Skipper Bermuda
Dollar Tree's 1,000 store closure tells the perils of poor acquisitions
Nancy Pazelt Obituary
Cheetah Pitbull For Sale
Section 212 at MetLife Stadium
Electronic Music Duo Daft Punk Announces Split After Nearly 3 Decades
Inducement Small Bribe
Alston – Travel guide at Wikivoyage
LumiSpa iO Activating Cleanser kaufen | 19% Rabatt | NuSkin
Ratchet And Clank Tools Of Destruction Rpcs3 Freeze
bot .com Project by super soph
Minterns German Shepherds
Okta Login Nordstrom
Who Is Nina Yankovic? Daughter of Musician Weird Al Yankovic
A Snowy Day In Oakland Showtimes Near Maya Pittsburg Cinemas
Sleep Outfitters Springhurst
How to Get a Check Stub From Money Network
Qvc Com Blogs
Latest Posts
Article information

Author: Horacio Brakus JD

Last Updated:

Views: 6076

Rating: 4 / 5 (51 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Horacio Brakus JD

Birthday: 1999-08-21

Address: Apt. 524 43384 Minnie Prairie, South Edda, MA 62804

Phone: +5931039998219

Job: Sales Strategist

Hobby: Sculling, Kitesurfing, Orienteering, Painting, Computer programming, Creative writing, Scuba diving

Introduction: My name is Horacio Brakus JD, I am a lively, splendid, jolly, vivacious, vast, cheerful, agreeable person who loves writing and wants to share my knowledge and understanding with you.