Why isnt this sudoer command run as root? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Server Fault. Closed 6 years ago. Improve this question I want to give PHP access to a very specific script using a configuration under /etc/sudoers.d. So I did the following: visudo -f … Read more

Google Cloud Compute Engine CentOS 7 Sudo command

Till Friday 12/10/2018 I was able to run sudo commands (Ex:sudo mongodump –db iot_ac). Today When I tried to run any command as root(sudo),i get the below message(Connected through SSH): We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: Respect the privacy of … Read more

How do I add a user to the sudoers file? [closed]

It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago. I already know that I should: run visudo … Read more

I want a user to run bash scripts with sudo [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Server Fault. Closed 6 years ago. Improve this question So this is for a school assignment. I have a working Bind9 and Apache2 server. I’ve written 3 scripts that make appropriate changes … Read more

logged in as root, make all files in /home/user chown to user when git pull

I like to stay logged into my (Ubuntu) VPS as root. Now I am running into issues when I git pull into my wordpress directory at /home/user . All new files will have user and group assigned as “root”, but it will not work in wordpress unless they are owned by “user”. So either wordpress … Read more

Is it possible to “sudo su” using ssh in bash? [duplicate]

This question already has answers here: `sudo echo “bla” >> /etc/sysctl.conf` permission denied (5 answers) Closed 6 years ago. #!/bin/bash USERNAME=ksmith HOSTS=”linux1″ YUPDATE=”sudo yum -y update” FIXDATE=”sudo -u echo -e ‘ZONE=”America/New_York”\nUTC=true’ > /etc/sysconfig/clock” for HOSTNAME in ${HOSTS} ; do ssh -tt -l ${USERNAME} ${HOSTNAME} “${YUPDATE}; ${FIXDATE}” done I get the error: sudo -u echo -e … Read more

Permission denied when executing perl via sudo

Command: ssh user@testhost “sudo -u tester env PERL5LIB=/home/tester/perl5/lib/perl5 /home/tester/perl5/bin/testperl” Result: Can’t locate testperl.pm: Permission denied at /home/mogile/perl5/bin/testperl line 15. How can I fix the problem? Answer The problem is that perl @INC contains dot (current directory), but the current directory (ssher’s home directory) cannot be accessed by the executor tester, so the perl interpreter complains … Read more