Questions tagged [sudo]

sudo is a tool which allows users to run commands as another user (usually the root user)

sudo allows users to run commands as another user. It is typically used to allow trusted users to run commands as root, without giving them root access, or to allow a user to run commands as another user. Both of these uses must be allowed by the root user.

886 questions
-2
votes
1 answer

How to edit sudoers file in ubuntu

I accidentally changed the mode of the file /etc/sudoers and added a line to the file. Now every time I want to "sudo", I got a error message like "parse error in /etc/sudoers near line 21" I can't login as a root also now. How can I solve this.
Abhi
  • 97
  • 1
-2
votes
1 answer

sudo -u ... -i doesn't preserve a user's PATH

I'm trying to determine a user's path when I'm root, but sudo, even with the -i flag, doesn't seem to replicate the user's environment correctly. Is this some sudoers policy setting? $ sudo bash # export PATH=$PATH:/dev/null/$RANDOM # printenv…
David Ehrmann
  • 169
  • 1
  • 5
-2
votes
2 answers

How do I report vulnerability in sudo?

I have found a vulnerability in sudo and I was able to reproduce it on multiple instances of xubuntu. It didn't seem to work on debian. How do I report it properly? I have read so much about responsible disclosure, but noone says where to look for…
naugtur
  • 284
  • 3
  • 11
-2
votes
2 answers

setting up sudo account

I want to create a managed account with root powers and the ability to su as root if need be to manage the box without needing root. What is the correct way to do it? Does this work? /usr/sbin/adduser -u 0 -o -g 0 -G 0,1,2,3,4,6,10 -M admin
Nikki Wilson
  • 101
  • 1
  • 7
-2
votes
1 answer

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…
petergus
  • 121
  • 4
-2
votes
1 answer

Su fails despite entering in the correct password

I just recently installed Ubuntu 11.04 on my desktop, and I only entered in one password during the install process. This password works to log into the machine, run updates etc. When I open up the terminal, and try to use su and I enter in the same…
Troy Knapp
  • 103
  • 6
-2
votes
1 answer

Sudo user running app: can it be elevated to be root by app?

Sudo user running app: can it be elevated to be root by app? e.g., user "user_xyz" is a regular user in sudo group. sudo command Does not require password. If the user run an app, can the app elevate the user to be a root user causing security…
eastwater
  • 111
  • 2
-2
votes
1 answer

What's the magic path for npm when using sudo?

I remember I was able to use something like sudo ${which npm} run xxx when I needed root privilege to run npm. What is it?
-2
votes
2 answers

How to protect from coworkers

Hello how to protect linux account form other administrators(coworkers) in company who can use your account to steal data and point a police that you are the guy who steal data from company. if others coworkers have sudo they can change user by su…
-3
votes
1 answer

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…
-3
votes
3 answers

I want a user to run bash scripts with sudo

So this is for a school assignment. I have a working Bind9 and Apache2 server. I've written 3 scripts that make appropriate changes to the configuration files DNS add zone DNS add record HTTP add vhost They are stored in /etc/scripts. These…
Dnice
  • 9
  • 3
-3
votes
1 answer

How to not have to type sudo but still stay current user?

I want to be able to execute root commands without needing to type sudo, but I don't want to change user so that I can still for example be able to do "cd ~" to go to where I have been doing work and have aliases. How can I do this?
Edwin Evans
  • 123
  • 4
-3
votes
1 answer

How do I add a user to the sudoers file?

I already know that I should: run visudo be logged in as root But then what changes should I make to the sudoers file? p.s. The question got 'down-voted'. Is this a bad question?! I looked at man sudoers, and there are several pages of…
houtsnip
  • 1
  • 3
-4
votes
6 answers

Sudo immediately after login asks for password

If you think about it, it is kind of silly that sudo asks for your password even if you just logged into the machine and entered your password. I realize that sudo and /bin/login are two entirely different mechanisms, but it would be nice if sudo…
TomOnTime
  • 7,945
  • 6
  • 32
  • 52
-5
votes
2 answers

Why isnt this sudoer command run as root?

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 /etc/sudoers.d/99-php And entered this sudo rule: www-data ALL = (root) NOPASSWD: /etc/my_script.sh Inside the…
1 2 3
59
60