Questions tagged [sudo]

The sudo command is a program for Unix and Unix-like computer operating systems that allows a user to run programs with the security privileges of another user (normally the superuser, or root). The name is an abbreviation for "substitute user do" (as in, do a command as if started by another user).

The sudo command is a program for Unix and Unix-like computer operating systems that allows a user to run programs with the security privileges of another user (normally the superuser, or root). The name is an abbreviation for "substitute user do" (as in, do a command as if started by another user).

Unlike the su command, users typically supply their own password to sudo rather than the root password. After authentication, and if the /etc/sudoers configuration file permits the user access, then the system will invoke the requested command.

2818 questions
29
votes
2 answers

Best practices to avoid Jenkins error: sudo: no tty present and no askpass program specified

When running any sudo command from Jenkins I get the following error: sudo: no tty present and no askpass program specified. I understand that I can solve this by adding a NOPASSWD entry to my /etc/sudoers file which will allow user jenkins to run…
s g
  • 5,289
  • 10
  • 49
  • 82
28
votes
3 answers

Using pscp and getting permission denied

I'm using pscp to transfer files to a virtual ubuntu server using this command: pscp test.php user@server:/var/www/test.php and I get the error permission denied. If I try to transfer to the folder /home/user/ I have no problems. I guess this has…
Espen
  • 3,607
  • 11
  • 48
  • 75
28
votes
2 answers

Unable to use sudo on OSX, getting sudo: unknown uid 501: who are you?

When I type sudo in terminal I get sudo: unknown uid 501: who are you? and when I type su I get su: who are you? I think I must have changed super user permissions somehow on my personal machine. I'm not able to use sudo commands now, and…
kashkar
  • 663
  • 1
  • 8
  • 22
28
votes
9 answers

How do I run my application as superuser from Eclipse?

I'm running in to an error when I try to run my server application from Eclipse. The error is java.net.BindException: Permission denied. I think this is because I am using port 443 to set up an SSL connection. I can get around this problem if I run…
Ronald
  • 16,033
  • 9
  • 27
  • 29
28
votes
2 answers

What is the difference between `sudoedit` and `sudo vim`?

What is the difference between sudo vim /etc/services and sudoedit /etc/services? I tried to edit the /etc/services file in linux. sudoedit is allowing to edit, but sudo vim is not allowing to edit.
Nadaraj
  • 509
  • 1
  • 7
  • 14
27
votes
3 answers

Jenkins sudo: no tty present and no askpass program specified with NOPASSWD

I spend several days setting up the file /etc/sudoers to be able to give permissions to root to the user jenkins. I have Jenkins installed on my server because I host several projects with symfony, ionic, neo4j, etc... The problem is that I can not…
Ander Acosta
  • 1,060
  • 1
  • 12
  • 25
27
votes
4 answers

RVM and thin, root vs. local user

So I'm trying to get thin to run as a service with RVM. After a thin install I manually updated /etc/init.d/thin to use an su - user when running the config command so that thin was running as a local user, rather than root. So far so good. Now,…
Rob Cameron
  • 9,674
  • 7
  • 39
  • 42
26
votes
10 answers

Rails: Why "sudo" command is not recognized?

In my application directory (on Windows) I run: sudo pdfkit --install-wkhtmltopdf as explained here, but I got this error: 'sudo' is not recognized as an internal or external command, operable program or batch file. What could be the…
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
26
votes
2 answers

Is there a difference between sudo mode and kernel mode?

In a UNIX like system, we have a user mode and a kernel mode. There are some instructions which cannot be accessed in the user mode. However when we do sudo, we can access many critical sections of our OS, perform critical actions. My question is:…
sudeepdino008
  • 3,194
  • 5
  • 39
  • 73
26
votes
6 answers

sudo: effective uid is not 0, is sudo installed setuid root?

I am trying to create deb package from LXC rootfs, and after creating it I want to install that package any computer. Up to this point I achieved packaging and installing deb package, however after installation of LXC package, I cannot be…
Salih Kardan
  • 579
  • 1
  • 6
  • 16
26
votes
9 answers

Is there any graphical "sudo" for Mac OS X?

I'm designing a little software in Java. I don't know the term/definition to what I'm doing, but I'm prompting commands from Java to the terminal. Something like this: Process process = Runtime.getRuntime().exec("command"); I've done this before in…
user89862
25
votes
10 answers

How can I execute a bash function using sudo?

I tried exporting the function and then executing it with bash, but that doesn't work: $ export -f my_func $ sudo bash -c 'my_func' bash: my_func: command not found If I try to run the function with bash without sudo (bash -c 'my_func'), it…
Miroslav
  • 528
  • 1
  • 6
  • 11
25
votes
2 answers

How to run VScode in sudo mode in WSL2?

I was configuring the new Windows subsystem for Linux 2 developing environment. I have installed VSCode in Windows and WSL2 distribution of Ubuntu 18.04. I can open VSCode in Ubuntu(accessed through Windows Terminal) normally when logged as normal…
25
votes
7 answers

Save file as root after editing as non-root

Ok so this happens to me all the time. There has to be a better solution. Let's say you do vim /etc/somefile.conf and then you do i but realize you are not sudo and you can't write. So then I lose my changes by doing :q then sudo !! and make my…
Amir Raminfar
  • 33,777
  • 7
  • 93
  • 123
25
votes
2 answers

How to use SSH and SUDO together with TRAMP in Emacs

Possible Duplicate: Open file via SSH and Sudo with Emacs I want to open a file using sudo (say, /etc/hosts) on a remote machine connected by ssh using TRAMP on Emacs. I tried couple of options, but none of them worked. Can anybody tell me how to…
Jeevan Pingali
  • 1,072
  • 1
  • 9
  • 11