sudo - Execute a command with superuser privileges.

learn more… | top users | synonyms

1
vote
0answers
11 views

does sudo always set process limits to the numbers from /etc/security/limits.d?

I have observed the following behavior: [ec2-user@ip-10-66-68-55 ~]$ uname -a Linux ip-10-66-68-55 3.4.103-76.114.amzn1.x86_64 #1 SMP Fri Sep 12 00:57:39 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux ...
0
votes
0answers
19 views

Sudo command not found, error in jenkins execute shell

When I am executing a command in jenkins job (execute shell) with sudo, it throws an error like this: ..../bin/sh -xe /tmp/hudson7505852448142784880.sh + sudo whoami ...
1
vote
2answers
45 views

How to use sudo to delete the contents of a directory

I have a legitimate need to empty a directory to which my account does not have access (it is a cache directory used by an application, and is owned by the account that runs the application.) My ...
0
votes
1answer
31 views

Allow all users to call sudo -l

On my debian server, when a user who does not have any rights in the sudoers file or any include dirs, calls sudo -l, he gets the standard "responsibility header" and is prompted for his password. Is ...
1
vote
2answers
36 views

Add test user to the sudoers file, to run ifconfig

I would like to see the ifconfig file with test user (under Linux Debian) that's why I have used the sudo task, but the terminal said that: test is not in the sudoers file. How can I take the test ...
1
vote
1answer
17 views

What does this command “sudo pip3 install name-of-the-file.whl” do?

I'm quite a newbie using the Bash scripting language, but I'm trying to learn it a little bit more. I know that sudo is a command used for administrators' tasks, such that installing or uninstalling ...
1
vote
0answers
21 views

Is it safe to disable password for a user, if it only uses SSH key login?

We want to remove the password usage on a UNIX system. The users should only log in with SSH key. Not password. So their password field in the /etc/shadow file will be "*" and set their password to ...
0
votes
0answers
25 views

Obtaining error message using apt-get: “Unable to fetch some archives…” [closed]

when i use sudo apt-get upgrade, I'm getting this message: E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
5
votes
3answers
692 views

Why does “$ sudo echo 'yo' ” work even though echo is a shell built in function? [duplicate]

I understand that sudo cd /directory will return: sudo: cd: command not found because cd is a shell builtin and not a binary. But then, why does sudo echo 'this is a test' works fine? What ...
5
votes
2answers
683 views

Why doesn't 'sudo bash && cd desktop' cd in to the desktop folder? [duplicate]

I have a folder with chmod 000 permissions on it with a lot of different stuff in, the way I get in is a start bash in sudo by running sudo bash. Why can't I do &&? I want to cd into the ...
2
votes
1answer
83 views

Call sudo from Jenkins

I have one build machine which has a user abc which is has limited sudo access. When I check out the source code and run my build script, it works fine. The build script contains sudo calls for which ...
0
votes
1answer
40 views

The “Sudo” Command are for debian-based, Linux-based distributions, right?

Let's say that I want to teach someone the command line but in the beginning, I only want to teach them the sudo commands. This means all the basic and useful command lines but using sudo. This ...
2
votes
3answers
559 views

What mechanism prevents any user from accessing any other user's files via root?

On a multi-user system, what protects against any user accessing any other users files via root? As context, the question is based on my understanding as follows: There are two commands related to ...
2
votes
2answers
68 views

What is my sudo password?

When installing things I am sometimes asked for my sudo password. I don't remember ever having one or setting one. But I do know my su password which has always worked fine for me. It is not the same ...
0
votes
2answers
55 views

I get an error whenever I try to add myself to sudoers

So I installed Debian yesterday, and I tried to make myself a sudoer so that I don't have to be root every time I try to install something. However, this always happens when I add my user to the sudo ...
1
vote
0answers
32 views

gksu -S ask for password only once even when set to three times in sudo configuration

I have a problem with gksu command. It always ask for password only once even when I set Defaults passwd_tries=3 in /etc/sudoers file. Command: $ gksu -S --debug ls No ask_pass set, using default! ...
1
vote
2answers
81 views

Gnome 3 - custom keyboard shortcut to run command as root?

My keyboard backlight function keys don't seem to work, so I've written a script to change the keyboard brightness, which must be run as root. It is invoked like so... sudo /usr/bin/local/backlight ...
1
vote
2answers
46 views

How to check if the “sudo” permission will be necessary to run a command?

Is there a way to determine easily whether I can read or write to/from a given file, or whether I will need to use "sudo" to do so? Running commands unnecessarily as sudo means that those files get ...
3
votes
5answers
137 views

How to allow authentication with `sudo` using an alternate password?

I have been given a long password by my company for my Ubuntu system. This password is cumbersome to enter when authenticating with sudo repeatedly. Can I authenticate with sudo using a password ...
2
votes
1answer
59 views

Use sudo with ssh command and capturing stdout

I'm trying to run a command as root (via sudo) on a remote server, and capture stdout (but not stderr) into a file. eg. Something like this: ssh user@remote "cat /root/file.tar | gzip" > ...
2
votes
1answer
26 views

Why can I not do visual mode when using visudo?

I thought perhaps vim was in some compatibility mode of some sort. To make sure it was using vim instead of vi, I set the VISUAL environment variable but was still unable to get into visual mode ...
1
vote
1answer
45 views

Accidentally deleted /dev/tty, how to bring it back on debian7?

I am on debian 7 and accidentally delete /dev/tty so I cannot sudo su anymore. I can still ssh with my username however when I want to get root rights with sudo su I get following message: sudo: no ...
3
votes
1answer
66 views

scripting copy of remote root-owned files when 'PermitRootLogin no'

I'm setting up a cloud node (only ssh-accessible, GUIs deprecated, running Debian 7) with 'PermitRootLogin no' for security. For some applications I want to copy some root-owned config files from the ...
2
votes
1answer
63 views

ssh as super user

I did the following mistake on a remote server : # sudo chmod 700 / Now no user but root can do anything. I can't even ssh as a normal user anymore, since I don't have permission to access bash. ...
0
votes
0answers
19 views

cant edit anything on xampp as sudo user [closed]

I’m new to Linux was an avid Windows user until recently trying on an old system seeing some major differences and converting, so I apologise if this question seems simple. I’m running the latest ...
0
votes
1answer
53 views

Is it possible to set the users .gitconfig (for git config --global) dynamically?

I have the problem, that we login to the systems as our own users johndoe and then have to do a sudo su - root to be able to do administrative tasks. We have the system config files in a git ...
1
vote
2answers
63 views

Pass arguments to a command run by another user

I have a bash script that is supposed to take some arguments and then run in a different user: test.sh #!/bin/bash sudo su user2 <<'EOF' echo $1 EOF However it prints blank: $ ./test.sh ...
0
votes
2answers
33 views

How can I sudo su and change directory just after?

I would like to create an alias that does something like this: alias userYYY='sudo su userYYY; cd /a/path/that/only/userYYY/has/access' So then from my command line, I am logged in with a sudoer ...
2
votes
2answers
64 views

how to write a script that will run commands after su, without using -c

I'm trying to automate a standard activity on a system I do not have root access on. The administrator of the systems have given me authority to run sudo su - 'user' command, and only that command. ...
1
vote
1answer
54 views

Choice of editor when running under sudo

On an Ubuntu 12.04 machine I've used the alternatives system to set the editor to vim.basic. I get the correct editor when root but not when I sudo to root and run crontab, and I'm trying to ...
7
votes
7answers
235 views

Emptying a file for root user does not work [duplicate]

I use below command to empty a file > file.txt It works perfectly fine! But there are some files with root user permissions. So I tried sudo > different-file.txt and I got below verbose ...
1
vote
2answers
71 views

How does the script /etc/init.d/sudo work?

I was reading the script /etc/init.d/sudo. It has been written as a comment in the script that it provides limited super user privileges to specific users. Though, I could not understand the script ...
2
votes
2answers
44 views

sudo -E cannot excute some commands located in home dir?

symptom: $ sudo -E adb sudo: adb: command not found $ which adb /home/usr/opt/android/platform-tools/adb $ sudo -E echo ${PATH} ...:/home/usr/opt/android/platform-tools $ stat ...
0
votes
1answer
60 views

How does sudo decide whether a command is only executable by sudoers with ALL rights?

I just wondered why on a Debian system with sudo installed a default user can execute ls but not ifconfig since the binaries do have the same rights: -rwxr-xr-x 1 root root 114032 Jan 26 2013 ...
7
votes
2answers
235 views

su authentication failure, sudo missing

After removing the vim-minimal package, because it was conflicting with the GUI Vim I was trying to install, sudo has disappeared, and su is giving an authentication failure. [portOdin@localhost ~]$ ...
3
votes
1answer
66 views

Suppressing “sudo: sorry, a password is required to run sudo” [closed]

I am trying to test if a user has the required sudo rights to run a command as another user without providing a password. What I have is this sudo -u other-user -n true if [ $? -ne 0 ]; then ...
3
votes
1answer
256 views

How do I fill my password automatically from .bash_profile when running command as sudo?

I know I could just put something like sudo mypassword in my .bash_profile, but I don't want to run every command as root. I want password to autofill under following circumstances: only the ...
4
votes
3answers
529 views

Does sudo a command temporarily change $PATH to be the root's?

When running sudo <command> under a user login session, will that change $PATH to be the root's $PATH during the running of sudo <command>? If <command> relies on the user's $PATH, ...
18
votes
5answers
1k views

Is there a way to tell sudo to set my username as owner for the files created instead of root?

If I do a sudo cp /etc/foo.txt ~/foo.txt, the new file is created with root as the owner. Right now, I see no way around this other than using the last two commands (ls to clarify use-case): ...
3
votes
1answer
57 views

Software like Iceweasel and LibreOffice wont run without root/sudo

I recently decrypted my home directory by making a backup of my home directory, deleting the directory, and then replacing it again with the backup (followed a guide). Ever since, I can no longer run ...
35
votes
5answers
5k views

Why doesn't the sudo command need the root password?

I've been using Linux for a while now and whenever I typed sudo I thought I was switching over to the root user for a command. Apparently this is not true because all I need is my user account's ...
1
vote
1answer
109 views

Allow AD Groups to SUDO

I'm adding some Fedora 20 workstations to our Windows 2003 domain. I've successfully joined the domain with the boxes, and can login with domain accounts. Now I'm trying to allow the default AD group ...
1
vote
1answer
43 views

Why does the sudoers file contain IP addresses?

According to the documentation, modifications of this file may enable local users to execute sudo commands on remote machines: user1 192.168.1.14=(user2:group1) ALL According to what I read, this ...
4
votes
1answer
89 views

How to compile programs on Linux systems when I don't have sudo privileges to install the dev dependencies [duplicate]

How should I go about compiling programs that depend on libraries whose development packages (headers and such) aren't pre-installed on the system when I don't have sudo access? In this particular ...
0
votes
1answer
60 views

install .deb package locally without using sudo [duplicate]

I am using Debian in my office which is controlled by an administrator. I want to install rescuetume. I downloaded the .deb file in my local disk and I want to install it locally. Every time I do ...
0
votes
2answers
71 views

Can malware run itself after user enters sudo mode?

As far as I know malware is very uncommon in Linux systems, because majority of important commands require root access. So my question is, can malware just wait until I enter sudo mode (for example by ...
1
vote
1answer
57 views

Why do I get “Permission denied” when redirecting the output of sudo echo “xyz” to a file? [duplicate]

Why do I get -bash: test: Permission denied when I run sudo echo "xyz" > test The directory permissions are: drwxr-xr-x 3 root root 4096 2014-08-05 16:26 I have no problem creating a ...
1
vote
2answers
79 views

Why does sudo ignore aliases?

I am running Ubuntu 10.04 and I use upstart for daemon management. My enterprise application is run as a daemon and must be run as root because of various privileges. E.g.: sudo start ...
3
votes
1answer
34 views

sudo and fish: no credential caching

I use fish as my standard shell. And I use sudo sometimes. But I'm having problems with credential caching. On an Ubuntu system, this works: niklas@Niklas-Mobil~> sudo true [sudo] password for ...
5
votes
1answer
256 views

sudo - impersonating a user

I am trying to use the sudo command and sudoers file correctly so that I can run a command as another user. I have my sudoers file set up as follows: beans ALL = (root,apache) NOPASSWD: ...