ky10 server x86 auditd安裝(日志審計系統)

?概述

Auditd工具可以幫助運維人員審計Linux,分析發生在系統中的發生的事情。Linux 內核有用日志記錄事件的能力,包括記錄系統調用和文件訪問。管理員可以檢查這些日志,確定是否存在安全漏洞(如多次失敗的登錄嘗試,或者用戶對系統文件不成功的訪問)。

前置條件

cd /boot/grub2

編輯這個文件

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#### BEGIN /etc/grub.d/00_header ###
set pager=1if [ -f ${config_directory}/grubenv ]; thenload_env -f ${config_directory}/grubenv
elif [ -s $prefix/grubenv ]; thenload_env
fi
if [ "${next_entry}" ] ; thenset default="${next_entry}"set next_entry=save_env next_entryset boot_once=true
elseset default="${saved_entry}"
fiif [ x"${feature_menuentry_id}" = xy ]; thenmenuentry_id_option="--id"
elsemenuentry_id_option=""
fiexport menuentry_id_optionif [ "${prev_saved_entry}" ]; thenset saved_entry="${prev_saved_entry}"save_env saved_entryset prev_saved_entry=save_env prev_saved_entryset boot_once=true
fifunction savedefault {if [ -z "${boot_once}" ]; thensaved_entry="${chosen}"save_env saved_entryfi
}function load_video {if [ x$feature_all_video_module = xy ]; theninsmod all_videoelseinsmod efi_gopinsmod efi_ugainsmod ieee1275_fbinsmod vbeinsmod vgainsmod video_bochsinsmod video_cirrusfi
}terminal_output console
if [ x$feature_timeout_style = xy ] ; thenset timeout_style=menuset timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
elseset timeout=5
fi
set superusers=root
password_pbkdf2 root grub.pbkdf2.sha512.10000.5F635C22DDED2C2B461358B9438CED69BD916474219EA9C30024FC2F7D5D0EDE0226C221E0F0693E99A0BCE3CCA338EFF600DAAD7D6D63A5F21E5B4E88DD7A76.89AB83B39D775965D42706B71D4D9A80DE6224DFC3DC214E3B55450F5ABB3E9B94CE8408090725BF2E6D3E078F4C2CB9D73FF75BEECE545A589E4FE586E82BC0
### END /etc/grub.d/00_header ###### BEGIN /etc/grub.d/00_tuned ###
set tuned_params=""
set tuned_initrd=""
### END /etc/grub.d/00_tuned ###### BEGIN /etc/grub.d/01_users ###
if [ -f ${prefix}/user.cfg ]; thensource ${prefix}/user.cfgif [ -n "${GRUB2_PASSWORD}" ]; thenset superusers="root"export superuserspassword_pbkdf2 root ${GRUB2_PASSWORD}fi
fi
### END /etc/grub.d/01_users ###### BEGIN /etc/grub.d/10_linux ###
menuentry 'Kylin Linux Advanced Server (4.19.90-52.15.v2207.ky10.x86_64) V10 (Lance)' --class kylin --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.19.90-52.15.v2207.ky10.x86_64-advanced-6b73395b-1699-4bc2-b4b1-7ccf72b31129' {load_videoset gfxpayload=keepinsmod gzioinsmod part_msdosinsmod xfsset root='hd0,msdos1'if [ x$feature_platform_search_hint = xy ]; thensearch --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  58b14670-59ef-4016-874f-2415da23d7f4elsesearch --no-floppy --fs-uuid --set=root 58b14670-59ef-4016-874f-2415da23d7f4filinux	/vmlinuz-4.19.90-52.15.v2207.ky10.x86_64 root=/dev/mapper/klas-root ro resume=/dev/mapper/klas-swap rd.lvm.lv=klas/root rd.lvm.lv=klas/swap rhgb quiet crashkernel=1024M,high audit=0initrd /initramfs-4.19.90-52.15.v2207.ky10.x86_64.img
}
menuentry 'Kylin Linux Advanced Server (0-rescue-e79c6145621143fea7ff995ea010790b) V10 (Lance)' --class kylin --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-e79c6145621143fea7ff995ea010790b-advanced-6b73395b-1699-4bc2-b4b1-7ccf72b31129' {load_videoinsmod gzioinsmod part_msdosinsmod xfsset root='hd0,msdos1'if [ x$feature_platform_search_hint = xy ]; thensearch --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  58b14670-59ef-4016-874f-2415da23d7f4elsesearch --no-floppy --fs-uuid --set=root 58b14670-59ef-4016-874f-2415da23d7f4filinux	/vmlinuz-0-rescue-e79c6145621143fea7ff995ea010790b root=/dev/mapper/klas-root ro resume=/dev/mapper/klas-swap rd.lvm.lv=klas/root rd.lvm.lv=klas/swap rhgb quiet crashkernel=1024M,high audit=0initrd	/initramfs-0-rescue-e79c6145621143fea7ff995ea010790b.img
}### END /etc/grub.d/10_linux ###### BEGIN /etc/grub.d/10_reset_boot_success ###
# Hiding the menu is ok if last boot was ok or if this is a first boot attempt to boot the entry
if [ "${boot_success}" = "1" -o "${boot_indeterminate}" = "1" ]; thenset menu_hide_ok=1
elseset menu_hide_ok=0 
fi
# Reset boot_indeterminate after a successful boot
if [ "${boot_success}" = "1" ] ; thenset boot_indeterminate=0
# Avoid boot_indeterminate causing the menu to be hidden more then once
elif [ "${boot_indeterminate}" = "1" ]; thenset boot_indeterminate=2
fi
# Reset boot_success for current boot 
set boot_success=0
save_env boot_success boot_indeterminate
### END /etc/grub.d/10_reset_boot_success ###### BEGIN /etc/grub.d/12_menu_auto_hide ###
if [ x$feature_timeout_style = xy ] ; thenif [ "${menu_show_once}" ]; thenunset menu_show_oncesave_env menu_show_onceset timeout_style=menuset timeout=60elif [ "${menu_auto_hide}" -a "${menu_hide_ok}" = "1" ]; thenset orig_timeout_style=${timeout_style}set orig_timeout=${timeout}if [ "${fastboot}" = "1" ]; then# timeout_style=menu + timeout=0 avoids the countdown code keypress checkset timeout_style=menuset timeout=0elseset timeout_style=hiddenset timeout=1fifi
fi
### END /etc/grub.d/12_menu_auto_hide ###### BEGIN /etc/grub.d/15_ostree ###
### END /etc/grub.d/15_ostree ###### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; thensource ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; thensource $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

將下面中的0改成1

?修改之后的效果

保存,重啟系統

安裝腳本

yum install audit -y
systemctl start auditd

查看狀態?

systemctl status auditd

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/167945.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/167945.shtml
英文地址,請注明出處:http://en.pswp.cn/news/167945.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

golang學習筆記——接口和繼承比較2

接口和繼承 現在有一個需要要求大學生和足球運動員掌握英語技能,請問怎么實現? 給運動員和學生結構體添加studyEnglish方法顯示是可以的,但是籃球動員和中學生也學習了英語,顯示不行。這時,我們可以直接給足球運動員和大學生添加…

跳轉應用市場詳情頁market

關于作者:CSDN內容合伙人、技術專家, 從零開始做日活千萬級APP。 專注于分享各領域原創系列文章 ,擅長java后端、移動開發、商業變現、人工智能等,希望大家多多支持。 未經允許不得轉載 目錄 一、導讀二、概覽三、跳轉到各大廠商應…

播放器開發(四):多線程解復用與解碼模塊實現

學習課題:逐步構建開發播放器【QT5 FFmpeg6 SDL2】 前言 根據第一章內容,我們首先可以先把解復用和解碼模塊完成,其中需要使用到多線程以及隊列,還需要使用FFmpeg進行解復用和解碼動作的實現。 創建BaseQueue基類 BaseQueue.h…

亞馬遜兩步驗證有哪些驗證方法?

亞馬遜通常提供多種兩步驗證的方式,包括短信(通過手機接收驗證碼)和認證器應用程序(如Google Authenticator、Authy等)。選擇你偏好的方式。 短信驗證: 如果選擇短信驗證,需要將你的手機號碼關聯…

YOLOv8改進 | 2023 | LSKAttention大核注意力機制助力極限漲點

論文地址:官方論文地址 代碼地址:官方代碼地址 一、本文介紹 在這篇文章中,我們將講解如何將LSKAttention大核注意力機制應用于YOLOv8,以實現顯著的性能提升。首先,我們介紹LSKAttention機制的基本原理,…

loginctl - 控制 systemd 登錄管理器

loginctl loginctl用途loginctl安裝開啟loginctl服務session操作user操作管理用戶服務 loginctl - Control the systemd login manager Redhat/centos平臺使用loginctl管理登錄用戶與session loginctl用途 控制 systemd 登錄管理器管理當前登錄的用戶和session loginctl安裝…

Peter算法小課堂—高精度加法

指針與數組 看看以下代碼&#xff0c;請預測答案 #include <bits/stdc.h> using namespace std; int x[10]{0,1,2,3,4,5,6,7,8,9}; int main(){cout<<x<<endl;cout<<x3<<endl;cout<<*x<<endl;cout<<*(x7)<<endl;cout&…

定制手機套餐---python序列

if __name__ __main__:print("定制手機套餐")print("")#定義電話時長&#xff1a;字典callTimeOptions{1:0分鐘,2:50分鐘,3:100分鐘,4:300分鐘,5:不限量}keyinput("請輸入電話時長的選擇編號&#xff1a;")valuecallTimeOptions.get(key)if val…

代碼隨想錄算法訓練營第五十四天|392.判斷子序列 115.不同的子序列

文檔講解&#xff1a;代碼隨想錄 視頻講解&#xff1a;代碼隨想錄B站賬號 狀態&#xff1a;看了視頻題解和文章解析后做出來了 392.判斷子序列 class Solution:def isSubsequence(self, s: str, t: str) -> bool:dp [[0] * (len(t)1) for _ in range(len(s)1)]for i in ra…

Java 關于批量插入遇到的問題 -sqlserver

序言&#xff1a; 我們在做項目的時候&#xff0c;經常會遇到&#xff0c;對數據的新增動作&#xff0c;如果數據量很少的情況下&#xff0c;單個新增對性能還好&#xff0c;但是一旦涉及到 大數據量&#xff0c;如十萬&#xff0c;百萬&#xff0c;千萬&#xff0c;這個時候如…

RabbitMq使用與整合

MQ基本概念 MQ概述 MQ全稱 Message Queue&#xff08;[kju?]&#xff09;&#xff08;消息隊列&#xff09;&#xff0c;是在消息的傳輸過程中保存消息的容器。多用于分布式系統之間進行通信。 &#xff08;隊列是一種容器&#xff0c;用于存放數據的都是容器&#xff0c;存…

優秀的時間追蹤軟件Timemator for Mac輕松管理時間!

在現代社會&#xff0c;時間管理成為了我們工作和生活中的一大挑戰。如果你經常感到時間不夠用&#xff0c;無法高效地完成任務&#xff0c;那么Timemator for Mac將成為你的得力助手。 Timemator for Mac是一款出色的時間追蹤軟件&#xff0c;它可以幫助你精確記錄和管理你的…

Linux的基本指令 ( 一 )

目錄 前言 Linux基本指令 快速認識五個指令 ls指令 補充內容 pwd指令 補充內容 cd指令 補充內容 重新認識指令 指令的本質 which指令 alias指令 最后 一個文件的三種時間 tree指令及安裝 tree指令 前言 關于Linux操作系統的桌面&#xff0c;在學校教學中我們…

實用高效 無人機光伏巡檢系統助力電站可持續發展

近年來&#xff0c;我國光伏發電行業規模日益壯大&#xff0c;全球領先地位愈發鞏固。為解決光伏電站運維中的難題&#xff0c;浙江某光伏電站與復亞智能達成戰略合作&#xff0c;共同推出全自動無人機光伏巡檢系統&#xff0c;旨在提高發電效率、降低運維成本&#xff0c;最大…

Spark---SparkCore(一)

一、術語與寬窄依賴 1、術語解釋 1、Master(standalone):資源管理的主節點&#xff08;進程&#xff09; 2、Cluster Manager:在集群上獲取資源的外部服務(例如&#xff1a;standalone,Mesos,Yarn) 3、Worker Node(standalone):資源管理的從節點(進程)或者說管理本機資源的…

用Python寫一個瀏覽器集群框架

更多Python學習內容&#xff1a;ipengtao.com 在分布式爬蟲和大規模數據采集的場景中&#xff0c;使用瀏覽器集群是一種有效的方式&#xff0c;可以提高數據采集的速度和效率。本文將介紹如何用Python編寫一個簡單但強大的瀏覽器集群框架&#xff0c;以應對需要使用多個瀏覽器實…

WebGL/threeJS面試題掃描與總結

什么是 WebGL&#xff1f;什么是 Three.js&#xff1f;請解釋three.js中的WebGL和Canvas的區別&#xff1f; WebGL(全寫Web Graphics Library)是一種3D繪圖協議&#xff0c;這種繪圖技術標準允許把JavaScript和OpenGL ES 2.0結合在一起&#xff0c;通過增加OpenGL ES 2.0的一個…

分庫分表、分布式數據庫、MPP

分庫分表、分布式數據庫、MPP的區別嗎&#xff1f; 一、MySQL分庫分表和MySQL分布式集群在性能方面各有優劣&#xff0c;具體取決于應用場景和需求。 MySQL分庫分表&#xff1a; 在分庫分表的場景下&#xff0c;可以將負載分散到多個數據庫實例上&#xff0c;從而提高整體性能…

【模糊測試】課堂筆記

模糊測試 模糊測試過程通常是自動化的。這個過程經典地分為以下幾個階段。 準備&#xff1a;這是第一階段&#xff0c;重點是 SUT 輸入和輸出格式的識別和規范。基于此&#xff0c;規范可以減少生成初始無效模糊數據的可能性并創建有效且精確的輸入。Fuzz Data Generation&am…

思科模擬器操作命令

模式 思科模擬器常見的模式有 用戶模式 能夠操作的命令比較少 特權模式特權模式下面可以操作的比較多 全局模式 接口模式 用戶模式進入特權模式: 命令enable 特權模式進行全局模式命令: configure terminal 退出命令 exit命令&#xff1a;返回上一層&#xff0c;即一步一步…