Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Sudo normally requires a user authenticate as themselves, and if I recall it can act different via remote execution due to the way the terminal is handled.</p> <p>I don't have a system to test this on at the moment, but but you could try ssh's -t or -T switches:</p> <pre><code> -T Disable pseudo-tty allocation. -t Force pseudo-tty allocation. This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing menu services. Multiple -t options force tty allocation, even if ssh has no local tty. </code></pre> <p>I suspect you could get this to work by adding the script you're remotely executing into /etc/sudoers:</p> <pre><code>{user} ALL=NOPASSWD:/where/is/the/script/Uninstall.sh </code></pre> <p>Then try:</p> <pre><code>"ssh -t user@server /where/is/the/script/Uninstall.sh" </code></pre> <p>EDIT:</p> <p>Found some details to help explain why sudo is behaving differently when executed remotely:</p> <p><a href="http://www.sudo.ws/sudoers.man.html" rel="nofollow">http://www.sudo.ws/sudoers.man.html</a></p> <blockquote> <p>The sudoers security policy requires that most users authenticate themselves before they can use sudo. <strong>A password is not required if the invoking user is root, if the target user is the same as the invoking user, or if the policy has disabled authentication for the user or command.</strong></p> </blockquote> <p>Perhaps it's hanging because it's trying to authenticate, whereas locally it wouldn't need to do so.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload