Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
55
rated 0 times [  55] [ 0]  / answers: 1 / hits: 3890  / 2 Years ago, sat, february 5, 2022, 1:57:32

When I run a command with sudo like the following, subsequent sudo commands will not ask for a password anymore.


sudo ls

But this still runs ls. If I don't want to run any command at the beginning, but just stop subsequent sudo commands from asking a password later on. Is there a way to do so?


More From » sudo

 Answers
6

Use sudo -v:



-v, --validate

Update the user's cached credentials, authenticating the user if necessary.



[#1891] Sunday, February 6, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
calronze

Total Points: 0
Total Questions: 110
Total Answers: 112

Location: Belarus
Member since Thu, Aug 11, 2022
2 Years ago
calronze questions
Sun, Jan 9, 22, 13:41, 2 Years ago
Wed, Feb 15, 23, 01:41, 1 Year ago
Sat, Jul 23, 22, 21:03, 2 Years ago
;