Questions tagged [sudo]

The sudo command allows users to run programs with the privileges of a different user (normally the root user). Use this tag for questions related to configuring and using the sudo command.

Filter by
Sorted by
Tagged with
1 vote
1 answer
6k views

run apt-get with a different user

I have a script where I add a new user sudo and after I need to install packages. Is that possible, to execute the apt-get as the new user? For example, I'm logged with the user1. I run the script. ...
sincos's user avatar
  • 11
1 vote
1 answer
553 views

apt-get install -f errors [duplicate]

Whenever I try doing sudo apt-get install -f I get this dell@elliot:~$ sudo apt-get install -f Reading package lists... Done Building dependancy tree Reading state information... Done Correcting ...
Root Byte's user avatar
0 votes
1 answer
356 views

UBUNTU 16.04 - wifi stopped working after fixed "/usr/bin/sudo must be owned by uid 0 and have the setuid bit set"

I missed up my chmod -R 777, but have now fixed it on secure boot. But after that my wifi stopped working. Have already restarted both network service and manager.
Jorge's user avatar
  • 3
3 votes
1 answer
4k views

SSH, Key-based authentication and passwords

For the last year I've been searching for this regularly and still haven't found an answer to my query. I work on Ubuntu servers quite a lot, both locally (VM) and staging / production servers and I ...
Richard's user avatar
  • 143
10 votes
3 answers
3k views

Ignore sudo in bash script

I have a small bash script: #!/bin/bash touch dummy.txt If I execute this script with sudo then it will create dummy.txt which will be root protected. What I want to do is: Regardless of whether ...
Anonymous's user avatar
  • 239
3 votes
1 answer
28k views

How To Restart Sudo Service on Ubuntu 16.10

I just migrated over to Ubuntu 16.10 from Debian Testing and modified the sudoers file, but there doesn't appear to be a 'sudo' service that I can restart to get it to recognize the changes. Does ...
Justin Andrusk's user avatar
0 votes
0 answers
127 views

Why is kate sudo-ed when remote file type is unknown?

I am accessing a remote server in Konqueror file manager using fish:// protocol (over SSH). All known file types that are plain text I can edit in Kate directly (right click > Open with > Kate). There ...
ñull's user avatar
  • 111
5 votes
1 answer
2k views

make sudoers use their own history file

I just can't seem to get it to work in Ubuntu, it should be a simple answer, maybe someone can help me. All I am trying to do is get a sudoers to use their own history file, but if I set the history ...
Adesso's user avatar
  • 203
13 votes
2 answers
24k views

Error running sudo (sudo: unable to resolve host [name]: Connection timed out)

Whenever I run a sudo command, I get an error message. jay@ignumtop:~$ sudo true sudo: unable to resolve host ignumtop: Connection timed out I'm not sure how this is really affecting my computer or ...
J. Long's user avatar
  • 131
0 votes
1 answer
453 views

Decrease privilege in a bash script

Is it possible to call from a bash script, run as sudo, another script with normal user privileges? Another option would be to run a specific command as a normal user but the whole script would be ...
Joe's user avatar
  • 1
1 vote
1 answer
158 views

Prevent other users to login as me and view my files

My Ubuntu user account name "user-3121" with type as "Administrator". There is one more account named "sysadmin" with type as "Administrator". How do I know whether "sysadmin" can login as me and view ...
verstappen_doodle's user avatar
4 votes
1 answer
1k views

Allow user in a chrooted shell to use a sudo command

I have a user chrooted to a directory, and everything is working smoothly. I want a group this user is in to be able to restart a single process that's being managed by supervisor, however, and I can'...
vaindil's user avatar
  • 928
1 vote
0 answers
68 views

Why is sudo colourless when user is colourful for `ls` command? [duplicate]

When I run the ls command using sudo-powers the file and directory names are all in white. When I run it as user the directory names are in bluish-purple, the scripts are in green and and the Asembler ...
WinEunuuchs2Unix's user avatar
0 votes
1 answer
767 views

Virtual host error duplicate

I'm running the following command: sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/projecttest.com and I am getting the following error: cp: cannot stat ‘/etc/apache2/...
Nadia Filimon's user avatar
3 votes
1 answer
1k views

What happens if you do sudo passwd without specifying a user?

I wanted to change my own password (as an admin) so I did the following command: sudo passwd and then it prompted for a password but when I tryed to relog, my password was not changed. I'm now ...
Yann Chabot's user avatar
0 votes
0 answers
28 views

Change root password without holding shift on grub [duplicate]

When I hold the left shift key on grub menu, nothing appears and it still boots to Ubuntu like it normally does (Ubuntu is the only machine installed). How can I change the password for root elseway? ...
Mona Jalal's user avatar
  • 4,545
12 votes
3 answers
12k views

mona is not in the sudoers file. This incident will be reported

So I just did a sudo apt-get upgrade and said Y to a question it asked me and now I am not a sudoer anymore. Even our root isn't a sudoer anymore. What's the solution? Configuration file '/etc/...
Mona Jalal's user avatar
  • 4,545
8 votes
2 answers
3k views

Changing gsettings for another user from an ansible script (started by vagrant)

I asked the question already on stackoverflow, but figured, that this could be a better place to get an answer: I want to provision a virtual machine with Ubuntu 16 LTS using vagrant and ansible (...
grackkle's user avatar
  • 184
2 votes
1 answer
469 views

Gnucash won't start

After new installation of Ubuntu 16.04 freshly installed through apt-get Gnucash not working in normal mode. It will starts only in terminal & and requires sudo "sudo Gnucash". After several ...
Alexander Ivanov's user avatar
1 vote
0 answers
71 views

Is it dangerous to leave Synaptic Package Manager open?

Just a thought that crossed my mind. Usually when I run Synaptic Package Manager, I do it with sudo, because obviously it is fairly useless otherwise. Sometimes I just leave it open; is this ...
Anon's user avatar
  • 12.1k
0 votes
2 answers
10k views

How to use sudoers for python's script

I had a script (named script) in bash, and I wanted to allow an user (named "userScript") to run it as root without giving any password. So, I edited the file /etc/sudoers and added 2 lines at the ...
julien2313's user avatar
1 vote
2 answers
3k views

Ubuntu Unity 16.10 'sudo: no tty present and no askpass program specified'

I made a script to set/unset the proxy setting for when I switch between work and home. The script works perfectly and now I wanna run it every time automatically when I login so I put it in my ....
JdKock's user avatar
  • 161
5 votes
2 answers
5k views

Telegram only runs with sudo

I don't know why, but I can only run Telegram with sudo. I just downloaded the tar from desktop.telegram.com and extracted its contents in /usr/local/Telegram. I can now open the program with: sudo ...
ig343's user avatar
  • 1,008
0 votes
2 answers
3k views

I can't install ubuntu-restricted-extras [duplicate]

When I try to install ubuntu-restricted-extras, using sudo apt-get install ubuntu-restricted-extras, I get the following error: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource ...
omkar's user avatar
  • 1
0 votes
2 answers
10k views

PyCharm on Launcher running as Sudo

So I can run PyCharm fine from terminal as Sudo, I have followed the guide to get it running off the launcher but it is not running as Sudo. Any idea? Ubuntu 16.04
Burf2000's user avatar
  • 131
17 votes
5 answers
19k views

File in /etc/sudoers.d/ not recognized

Running a fresh install of Ubuntu server 16.04.1, I tried to add a file in /etc/sudoers.d/ to give one user root privileges for a certain command. I added the file /etc/sudoers.d/servicetest with the ...
Cybran's user avatar
  • 339
12 votes
2 answers
10k views

Running a single executable with sudo adds two processes in process list

I wrote a program that captures the packets from the network interface. As it listens the network adapter, I need to run it with sudo. The question is, why when I run it, does it add two processes to ...
Ebrahim Ghasemi's user avatar
2 votes
1 answer
744 views

Messed up root permissions Ubuntu 14.04 [duplicate]

While changing a directory ownership, accidentally I did sudo chown subhadip / instead of sudo chown MyApp After realizing my mistake, tried to fixed few permissions i.e., sudo etc. by sudo ...
digiwizkid's user avatar
  • 2,535
0 votes
0 answers
17 views

Wont update ppa repositories [duplicate]

I have been having this problem recently. Everytime I add a ppa it says click enter, so it succeeds. Then I need to run sudo apt-get update in order to update the ppa. So when I run this this comes up....
Naiem da Legend's user avatar
0 votes
2 answers
1k views

Boot from USB, edit system files

I made a mistake in my evdev configuration, and now my system won't boot. I can boot from Ubuntu on a USB stick, though. How can I edit the relevant system file as root so that I can boot normally, ...
jerome's user avatar
  • 837
2 votes
1 answer
649 views

Does Ubuntu store sudo password in cache? [duplicate]

If we fire a command with sudo in terminal, it asks for password for the first time and if we fire another command with sudo immediately in same terminal, it won't ask for password again. Why is it so ...
node_analyser's user avatar
4 votes
1 answer
1k views

Cannot upgrade Chrome 52 to 54 in 16.04

$ sudo apt-get install google-chrome-stable Reading package lists... Done Building dependency tree Reading state information... Done google-chrome-stable is already the newest version (52.0....
Harri's user avatar
  • 75
5 votes
2 answers
2k views

See whether sudo mode is on (password is cached) on the command-line prompt

I want to know whether it is possible to indicate on the command-line (ideally in the prompt), whether sudo mode is on. By sudo mode I mean that I have already entered my password correctly once in ...
Byte Commander's user avatar
  • 108k
0 votes
1 answer
906 views

Can't install xfburn, unable to locate package [duplicate]

when i try to install xfburn it comes with this message: It says, it is unable to locate package xfburn
ERMANNO's user avatar
-1 votes
1 answer
3k views

Password prompt when installing software [duplicate]

I want to disable the prompt for a password when installing a software and when launching a vpn client (torGard). How can disable this? What I've done: in terminal > sudo visudo /etc/sudoers/ ...
b_siC's user avatar
  • 11
269 votes
6 answers
53k views

Where are sudo's insults stored?

For those who like humour, sudo can be configured to print a random more or less insulting or funny phrase instead of the neutral Sorry, try again. by adding the line below to /etc/sudoers (using the ...
Byte Commander's user avatar
  • 108k
1 vote
1 answer
624 views

Installing Android Studio without sudo access

Is it possible to install the Android SDK for Android Studio. I'm working on a shared computer but I'm not on the sudoers file
Moses Surumen's user avatar
4 votes
2 answers
960 views

Create a custom sudo command without password

I want to implement a script to execute any command with root privileges, but without having to put any password. At the terminal I would like to see it like this: ./newsudo "comand with root ...
Binkpang34's user avatar
1 vote
0 answers
348 views

Ubuntu 16.04 run python script when login screen is displayed (rc.local and lightdm not working)

I want to run this command when the login screen that prompts for your password is displayed: python ~/blabla/unlock.py &. I've tried using both lightdm and rc.local to no avail. Any help is ...
Ricky's user avatar
  • 11
0 votes
1 answer
451 views

What is sudo password [duplicate]

Actually i'm a new user i'm getting problem in knowing sudo password First of all, What is it? Secondly, Where do I get it? I'd really appreciate some help.
Abhinav's user avatar
4 votes
2 answers
5k views

Why do I need sudo? [duplicate]

This is a question from a rookie just trying to understand how and why things work like they do. Why do I have to use sudo everytime? The second use of sudo in a term session doesn't require a ...
dvoiss's user avatar
  • 49
3 votes
1 answer
1k views

What is the most secure way to use sudo permissions in a script?

I have a bash script which needs to perform some actions while using sudo, both with root user permissions and permissions for other users, such as main user on a postgres database. These actions need ...
Arronical's user avatar
  • 19.9k
0 votes
1 answer
2k views

Run Script + Desktop File as Root w/out Prompt

I have two files, one being a desktop file, the other being a shell script. The desktop file is meant to open the shell script, and execute it in a xTerm GUI as root, without needing "sudo password." ...
David's user avatar
  • 3,377
1 vote
4 answers
4k views

How to make a script accessible to root user?

A regular user can run this script, but root can't find it. I have a simple script that I have saved in ~/bin. I updated the .profile file to include this folder in the PATH. I can go into terminal, ...
dhp904's user avatar
  • 21
0 votes
1 answer
59 views

Attempting different command with sudo and without

I have recently uninstalled and reinstalled pip. Then when I try executing it I get eli@eli-VirtualBox:/usr/local/bin$ pip --version bash: /usr/bin/pip: No such file or directory But when I try it ...
eli's user avatar
  • 1
20 votes
3 answers
21k views

gpgkeys: key F60F4B3D7FA2AF80 not found on keyserver

How can I fix this issue? mona@pascal:~$ sudo apt-get update Ign file: InRelease Get:1 file: Release.gpg [181 B] Get:2 file: Release [196 B] ...
Mona Jalal's user avatar
  • 4,545
21 votes
1 answer
62k views

Getting "Permission denied" even when using sudo command [duplicate]

I'm attempting to add a file to my /etc/apt/sources.list.d folder and for some reason despite using sudo it still says permission denied. Here's the code I'm trying to run. $ sudo cat >> /etc/...
Steven Brailsford's user avatar
0 votes
2 answers
616 views

Deleted my /usr/ directory, recovered with chroot now getting a Segmentation fault (core dumped) trying to run Sudo

I have a problem that I've been trying to fix for the last few days. Each time I resolve an issue, a new one pops up. Let me outline what has happened. I foolishly deleted all sub dirs in the /usr ...
Ozhound's user avatar
  • 23
4 votes
2 answers
4k views

Sudo user not in sudo group?

When adding user like this : sudo adduser someuser --ingroup sudo Added user can use sudo but he is not in /etc/group sudo nor in /etc/sudoers So how does it work ?
EdiD's user avatar
  • 4,467
1 vote
1 answer
4k views

Ubuntu on android linux deploy -sudo perm_root permission denied

I have installed ubuntu on samsung galaxy s3 using linux deploy and I can get the desktop using VNC. But I cant seem to use sudo? For example if I say: sudo apt-get install git I get : sudo: ...
user27815's user avatar
  • 141

1
26 27
28
29 30
58