proper way to sudo over ssh

I have a script which runs another script via SSH on a remote server using sudo. However, when I type the password, it shows up on the terminal. (Otherwise it works fine) ssh user@server “sudo script” What’s the proper way to do this so I can type the password for sudo over SSH without the … Read more

Why does sudo change the PATH? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 3 months ago. The community reviewed whether to reopen this question 3 months ago and left it closed: Original close reason(s) were not resolved Improve … Read more

How to use sudo inside a docker container?

Normally, docker containers are run using the user root. I’d like to use a different user, which is no problem using docker’s USER directive. But this user should be able to use sudo inside the container. This command is missing. Here’s a simple Dockerfile for this purpose: FROM ubuntu:12.04 RUN useradd docker && echo “docker:docker” … Read more

sudo echo “something” >> /etc/privilegedFile doesn’t work [duplicate]

This question already has answers here: How do I use sudo to redirect output to a location I don’t have permission to write to? [closed] (15 answers) Closed 10 months ago. This is a pretty simple question, at least it seems like it should be, about sudo permissions in Linux. There are a lot of … Read more

How do I use sudo to redirect output to a location I don’t have permission to write to? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 10 months ago. Improve this question I’ve been given sudo access on one of our development RedHat linux boxes, and I seem to find myself … Read more

How to fix npm throwing error without sudo

I just installed node and npm through the package on nodejs.org, and whenever I try to search or install something with npm, it throws the following error unless I sudo the command. I have a feeling this is a permissions issue? I am already the admin. npm ERR! Error: EACCES, open ‘/Users/chietala/.npm/-/all/.cache.json’ npm ERR! { … Read more