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

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.
主站蜘蛛池模板: 南华县| 陆丰市| 曲阜市| 永胜县| 临城县| 大关县| 南城县| 台南市| 南安市| 汝南县| 宝山区| 长寿区| 定陶县| 弥渡县| 惠安县| 郁南县| 梨树县| 方正县| 龙门县| 清涧县| 凤山县| 洪洞县| 八宿县| 会宁县| 米泉市| 贵德县| 张家界市| 巫溪县| 蓬安县| 厦门市| 微博| 沽源县| 杭锦旗| 临猗县| 长治县| 彰武县| 通榆县| 永寿县| 岱山县| 孟连| 高密市|