5

I use fish as my standard shell. And I use sudo sometimes.

But I'm having problems with credential caching.

On an Ubuntu system, this works:

niklas@Niklas-Mobil~> sudo true
[sudo] password for niklas:
niklas@Niklas-Mobil~> sudo true
niklas@Niklas-Mobil~>

On a Debian system, this doesn't work:

niklas@ThinServer ~> sudo true
[sudo] password for niklas:
niklas@ThinServer ~> sudo true
[sudo] password for niklas:
niklas@ThinServer ~>

But on the same system as the same user with bash:

niklas@ThinServer:~$ sudo true
[sudo] password for niklas:
niklas@ThinServer:~$ sudo true
niklas@ThinServer:~$

It works using dash, too.

Why aren't the credentials cached when I'm using fish? (And what can I do to solve this problem?)

1 Answer 1

4

Edit your /etc/sudoers, add this line (or edit if it's existed):

Defaults !tty_tickets

fish somehow thinks command is from separated session. It's maybe due to tty's modification date as reported by stat is changing under fish. This was caused by fish's futimes() call

See more details:

2
  • 1
    Note, this issue was fixed in later version, but Debian hasn't cherrypicked it, Ubuntu did.
    – Braiam
    Commented Aug 4, 2014 at 15:36
  • 1
    @Braiam: Yes, I'm using Debian Wheezy, which contains fish version 1.23.1 on its repo, too old.
    – cuonglm
    Commented Aug 4, 2014 at 15:38

You must log in to answer this question.

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