1

This is using Ubilinux based on Debian stretch but the same behavior happens with Ubuntu 16.04 and probably others.

gksudo asks for my password every single time.. I can easily enough configure regular sudo to asks password only every three hours by using visudo. But this does not "take" on gksudo.

Is there any way to make gksudo "remember" the password for some time?

4
  • ssh-agent probably is not running. Is it installed? Feb 7, 2018 at 16:05
  • 2
    gksudo should never ask for the root password. It should ask for your password. Unless you're logged in as root, in which case: why are you logging into a GUI as root?
    – DopeGhoti
    Feb 7, 2018 at 16:30
  • Okay, I corrected the question to say it asks for my password. @RuiFRibeiro why would ssh keychain agent affect gksudo? I enabled it anyways and it did nothing as expected. I don't have any ssh keys installed to start with.
    – Barleyman
    Feb 7, 2018 at 16:54
  • Bah humbug. Looks like there's no way around this annoyance. Perhaps another program than gksudo. Plain old sudo fails in XRDP session due to not connecting to the screen unless you remove the access control with xhost +
    – Barleyman
    Feb 16, 2018 at 13:05

1 Answer 1

0

This can be configured globally for all sudo-like programs with the timestamp_type variable in sodoers(5).

The following (executed as root) creates an appropriate file that sets this variable so that all invocations of respective users are cached no matter how they have been executed. Beware any security squirrels biting your head off though!

echo 'Defaults  timestamp_type=global' >/etc/sudoers.d/timestamp_type
chmod 0440 /etc/sudoers.d/timestamp_type
chown 0:0 /etc/sudoers.d/timestamp_type

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .