[sudo-users] Using sudo from a GUI app (getting a persistent ticket)

Shawn McMahon syberghost at gmail.com
Fri Sep 27 10:34:43 MDT 2013


Try forcing tty allocation with a "-t" to the ssh command:

ssh -t localhost ./sudotest.sh


On Fri, Sep 27, 2013 at 10:47 AM, Alec Leamas <leamas.alec at gmail.com> wrote:

> OK, I probably break the thread here. Sorry for that.
>
> Below is a short bash script which somehow reproduces this problem. If I
> run it directly, it behaves as expected and asks for password once or not
> at all.
>
> However, if I invoke this as "ssh localhost ./sudotest.sh" it fails to
> give me a valid ticket, and asks for password twice. To me, this looks like
> a bug. Or?!
>
> --alec
>
>
> PS: My system: Fedora 20 (sic!), sudo-1.8.6p7-2.fc20.i686
>
> ------------------------------**------
> $ cat ~/sudotest.sh
> #!/bin/bash
> set -x
> cat /proc/self/stat | cut -c 1-70
> sudo -S ls /root > /dev/null
> cat /proc/self/stat | cut -c 1-70
> sudo -S ls /root > /dev/null
> ------------------------------**------
> ______________________________**______________________________
> sudo-users mailing list <sudo-users at sudo.ws>
> For list information, options, or to unsubscribe, visit:
> http://www.sudo.ws/mailman/**listinfo/sudo-users<http://www.sudo.ws/mailman/listinfo/sudo-users>
>


More information about the sudo-users mailing list