I want to change sudo timeout, so I edit sudoers via visudo (as adviced in many tutorials online) to the following form:
Defaults env_reset , timestamp_timeout=20
root ALL=(ALL:ALL) ALL
%admin ALL=(ALL) ALL
%sudo ALL=(ALL:ALL) ALL
Defaults:my_username timestamp_timeout=10
the problem is, that nothing works and it seems I have sudo timeout=0. This is my output from uname -a
:
Linux comp 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
UPDATE
What I've noticed it's only happens when I use fish (aka user friendly shell). So problem probably with fish itself not with sudoers file.
SOLUTION The problem was with my shell fish aka user friendly (not very friendly this time, isn't it?) shell. For some reason it seemed that sudo command each time went from different sessions. Adding Defaults !tty_tickets in sudoers file (as described http://us.generation-nt.com/answer/bug-598567-sudo-requires-reauthentication-each-use-ignoring-time-stamp-help-200510161.html ) solved the problem. See the link above for the addition information.
Thank you all for your attention without it I could not figure the thing out.
The problem was with my shell fish aka user friendly (not very friendly this time, isn't it?) shell. For some reason it seemed that sudo command each time went from different sessions. Adding
in sudoers file (as described http://us.generation-nt.com/answer/bug-598567-sudo-requires-reauthentication-each-use-ignoring-time-stamp-help-200510161.html ) solved the problem. See the link above for the addition information.
Thank you all for your attention without it I could not figure the thing out.
as the default user is member of admin group , my user name is "one"
Then press “ctrl+x” and then press “y” and to finish press enter.
By default sudo remembers your password for 15 minutes. If you want to change that you can do so by
timestamp_timeout=X
where X is the timeout expiration in minutes. If you specify 0 you will always be asked the password. If you specify a negative value, the timeout will never expire. E.g. Defaults env_reset,timestamp_timeout=5
RootSudoTimeout
Change sudo timeout
A text document will open up in the terminal.Navigate to the bottom of the document using your arrows on your keyboard.
Then press “ctrl+x” and then press “y” and to finish press enter.
NOTE
If you put a “-1″ value, you’ll have an unlimited sudo timeout. This isn’t very wise to do for normal users.
Increasing the value to 10, will give you a 10 minutes sudo timeout.
I'm wondering if the space around the
,
mark is your problem. I've not seen a sudoers file working with that type of syntax. Perhaps try removing the space before and after the,
in the sudoers file and see if that doesn't help.You could also try a user specific setting of
Defaults:moonwalker timestamp_timeout=20
to apply it to just your user account allowing you to skip that line and any potential syntax issues with it.