I frequently wrongly enter the password when running sudo command, and the sudo command usually need to wait 2 ~ 3 seconds before reprompting me a new password. I know it has the security consideration of this design.
Asked
Active
Viewed 439 times
1
-
1Silly question ... which tasks do you need to do as root often enough so 2 seconds become a waste of time? And if you do these so often: why do you not just add the things you do most often to your sudoers file with a NOPASSWD option? – tink Oct 22 '20 at 04:16
-
See [this question](https://unix.stackexchange.com/questions/2126/why-is-there-a-big-delay-after-entering-a-wrong-password), and [this answer](https://unix.stackexchange.com/a/2128/286615). – Seamus Oct 22 '20 at 04:35
-
1Assuming you are the only user or other users agree, you can set timestamp_timeout in /etc/sudoers to a large value or negative so that you almost never or never need to give the password more than once per session, or reboot if you also set timestamp_type=global . – dave_thompson_085 Oct 22 '20 at 06:27
-
@tink Thanks for your comment, maybe my description wasn't quite in a respectful tone in the last sentence (edited), but I really don't think my question is silly, I just want to ask for help for the thing that affects me. – Bi Ao Oct 22 '20 at 15:02
-
@BiAo - that may be a language barrier thing. If I had wanted to indicate that your question is silly I would have said "That is a silly question." The injection "silly question" here introduces my own question that follows ... which you still haven't answered. – tink Oct 22 '20 at 16:15
-
@tink alright I might had really misunderstood your what your statement, sorry for that. About your question, as I'm using linux on my personal computer, sometimes there's just a lot of daily task that I just need to require root previlege such as starting vpn, system upgrade, starting systemd etc.. – Bi Ao Oct 22 '20 at 17:05
-
@BiAo in that case my question about `NOPASSWD` is valid =} ... just add the ten most frequent commands explicitly with that option. – tink Oct 22 '20 at 17:22