Linux - how to change the sudo command timeout

Linux - how to change the sudo command timeout

Hi,

I often run into a problem where I have a few commands set as an alias in .bashrc. These commands are called under sudo and take a longer time. E.g. the last command is to shut down the machine, also under sudo, and it may not be executed in 99% of cases. Is it possible to change the timeout for the sudo command to be about 60 minutes, so that I do not have to re-enter the sudo password for the standard timeout? Thanks


REPLY


Hello,

type sudo visudo

Find Defaults env_reset and replace it with:

Defaults env_reset, timestamp_timeout = 60

= to set the sudo timeout to 60 minutes

Související obsah

linux

bash

terminal

ubuntu

sudo

Komentáře

Vaše reakce na Linux - jak změnit časový limit pro platnost příkazu sudo

Reference

Podívejte se na naše reference

Prohlédnout

Aplikace

Podívejte se na naše aplikace

Prohlédnout

Co umíme?

Podívejte se co umíme

Prohlédnout

Co umíme?

Vytváříme sofistikované aplikace pro náročné

Od webových aplikací přes android až po převodové můstky či složité informační systémy.

Podívejte se k nám

Máte ještě čas? Podívejte se na další rubriky

Tento web používá soubory cookie. Dalším procházením tohoto webu vyjadřujete souhlas s jejich používáním.. Více informací zde.