- Mastering Linux Security and Hardening
- Donald A. Tevault
- 188字
- 2021-07-02 19:19:22
Hands-on lab for disabling the sudo timer
For this lab, you'll disable the sudo timer on your CentOS VM.
- Log in to the same CentOS virtual machine that you used for the previous lab. We'll be using the user accounts that you've already created.
- At your own user account command-prompt, enter the following commands:
sudo fdisk -l
sudo systemctl status sshd
sudo iptables -L
You'll see that you only needed to enter the password once to do all three commands.
- Open visudo with:
sudo visudo
In the Defaults specification section of the file, add the following line:
Defaults timestamp_timeout = 0
Save the file and exit visudo.
- Perform the commands that you performed in Step 2. This time, you should see that you have to enter a password every time.
- Open visudo and modify the line that you added so that it looks like this:
Defaults:lionel timestamp_timeout = 0
Save the file and exit visudo.
- From your own account shell, repeat the commands that you performed in Step 2. Then, log in as Lionel and perform the commands again.
- Note that this same procedure also works for Ubuntu.
推薦閱讀
- RESTful Java Web Services Security
- Kali Linux CTF Blueprints
- 黑客攻防技巧
- Python Penetration Testing Cookbook
- Kali Linux Wireless Penetration Testing Cookbook
- Applied Network Security
- 硬黑客:智能硬件生死之戰
- Falco云原生安全:Falco原理、實踐與擴展
- 信息安全導論(第2版)
- CTF那些事兒
- 華為防火墻實戰指南
- SQL Injection Strategies
- 空間群組密鑰管理研究:基于自主的深空DTN密鑰管理
- CTF特訓營:技術詳解、解題方法與競賽技巧
- 安全網絡構建