If I do sudo <command>
and enter the password, my Debian Squeeze remembers the fact I passed the password and never asks for it for i.e. 15 minutes.
But if I do sudo -i
and then exit
, the system does not remembers the password and asks for it all over again every time I use sudo -i
. Doing just once sudo <command>
makes the system not ask for password even for a next sudo -i
.
Here are the scenarios I've described above:
First one:
- login (by SSH),
sudo <command>
: system's asking for the password,sudo -i
: system is not asking for the password.
Second one:
- login (by SSH),
sudo -i
: system's asking for the password,exit
sudo -i
: system's again asking for the password.
Doing something beetween 2. and 3. makes the system remember the password.
What is the reason of such a behaviour? Is it possible to make the system remember the password (fact I passed it) also after using sudo -i
?
sudo -i
, immediatelyexit
orlogout
and then againsudo -i
, the password is properly remembered and the second sudo command doesn't ask for it.