It doesn't make sense to me that after authorising myself by logging in, I then have to separately authorise myself to sudo, potentially typing the password twice. This has all come to a head recently when I have been logging in from my android phone where it takes 10 or 15 seconds to type the password in on the touchscreen instead of 2 seconds on my keyboard!
So I would ideally like to configure sudo such that after authorising myself (whether via a console login, an ssh password login or an ssh key login) sudo is unlocked for 15 minutes, as if I had typed a password for the sudo command.
So this would maintain the security benefits of automatically locking sudo if I left a console open, but giving some convenience.
I suppose the disadvantages are that I unlock sudo on every login regardless of whether I want to use sudo, and allowing sudo for ssh key logins could allow someone who compromised a private key to use sudo despite not knowing the password, which would I suppose delegate the security of the machine to the security of the private key. So a loss of a private key would transfer from a remote access vulnerability to a remote root access vulnerability...
But still, it would be quite convenient!
sudoevery time you login, you're doing something wrong.sudoshould be kept to computer maintenance tasks, not to daily work / home tasks... – Tom Wijsman Aug 12 '12 at 14:36sudowould be pointless and he would login as an account he doesn't have to runsudowith. Use the right account / privileges / security / tools for the right job... – Tom Wijsman Aug 12 '12 at 15:02