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

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.
主站蜘蛛池模板: 黔西县| 陆良县| 富顺县| 临江市| 远安县| 西丰县| 资兴市| 南昌市| 屏东县| 五河县| 会同县| 满洲里市| 长宁县| 鄂温| 旌德县| 南城县| 浪卡子县| 阿城市| 铅山县| 延津县| 禄丰县| 崇阳县| 岳阳县| 叶城县| 故城县| 如皋市| 黄浦区| 库伦旗| 武义县| 喀喇| 西充县| 周口市| 福州市| 高雄县| 罗江县| 利津县| 鄱阳县| 旌德县| 盘山县| 邵东县| 郎溪县|