官术网_书友最值得收藏!

Hands-on lab for disabling the sudo timer

For this lab, you'll disable the sudo timer on your CentOS VM.

  1. 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.
  2. 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.

  1. 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.

  1. Perform the commands that you performed in Step 2. This time, you should see that you have to enter a password every time.
  2. 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.

  1. From your own account shell, repeat the commands that you performed in Step 2. Then, log in as Lionel and perform the commands again.
  2. Note that this same procedure also works for Ubuntu.
主站蜘蛛池模板: 崇阳县| 丰城市| 江华| 来安县| 蛟河市| 南京市| 临武县| 南澳县| 洛宁县| 清徐县| 洛阳市| 长治市| 吉隆县| 广昌县| 玛沁县| 渑池县| 讷河市| 嵊州市| 贵定县| 建瓯市| 张北县| 邵武市| 盐边县| 会宁县| 灵山县| 葵青区| 聊城市| 榕江县| 清苑县| 上杭县| 利川市| 峨眉山市| 湘潭县| 达孜县| 德令哈市| 南京市| 泉州市| 司法| 石狮市| 阜宁县| 上高县|