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.
2,894
questions
0
votes
0
answers
482
views
Ubuntu password no longer works after login
I recently installed Ubuntu 22.04 on a laptop (dual boot with Win 11) and something weird happened to my password. I can only use it to login when I select a user (the booting GUI) and after that, ...
0
votes
0
answers
378
views
Buildozer Error "pkg-config location is not supported on linux for prerequisite: openssl"
I want to make apk file for android, using Buildozer. This my game: https://youtu.be/t7jtlkXcS68
I'm getting an error: [WARNING]: pkg-config location is not supported on linux for prerequisite: ...
3
votes
4
answers
23k
views
python module not found in sudo mode (ubuntu 20.04)
I am using ubuntu 20.04 to write python programs. I usually install python packages without the sudo prefix. But I noticed that if I go into the sudo mode and then try to import a previously installed ...
0
votes
1
answer
4k
views
Why am I getting error: `found a tab character that violate indentation` in my Netplan YAML file?
I am getting the following error when trying to do sudo netplan apply:
Invalid YAML at //etc/netplan/lan-segment.yaml line 11 column 0: found a tab character that violate indentation
This happened ...
1
vote
1
answer
490
views
sudo apt update error, plex and pi-hole not working
I recently installed Ubuntu 20.04 (note: I am a complete novice) on my old windows laptop.
After a few weeks I wanted to install Pi-hole and found out I have an sudo apt update error.
Now Plex has ...
1
vote
1
answer
1k
views
Cannot use systemctl as a user after a "sudo su - media" : Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined
I'm trying to create a service as a user but it does not work :
admin $ sudo su - media
$ systemctl --user edit fmgr-copro.service --full --force
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS ...
3
votes
1
answer
1k
views
"sudo command" not working, but after sudo su when I enter command is working [duplicate]
My Ubuntu version is Ubuntu 22.04.2 LTS. I have one user (ahmet) and it is member of sudo. I download intellij idea and I want to use its mvn lib for everyone. I edited /etc/bash.bashrc as in this ...
3
votes
1
answer
267
views
sudo apt update: Malformed entry 1 in list file /etc/apt/sources.list.d/pgdg.list
I have been trying to install pgadmin4 for a while, (but no success) so I can have a GUI to navigate postgresql server. Don't why but simple update command is also failing now. What did I do? where is ...
1
vote
3
answers
2k
views
How to get email for unauthorized sudo attempts?
As per this question, unauthorized attempts to sudo are saved in /var/log/auth.log and by default, a mail is sent to /dev/null. Is there any way to prevent that from happening and send the mail to an ...
0
votes
1
answer
404
views
Permission Denied when trying to Install Anaconda Public GPG Key to the Trusted Store
Context:
I'm setting up JupyterHub on an EC2 instance running Ubuntu 22.04 LTS and I'm trying to install the Anaconda Public GPG Key to Trusted Store via the following command:
curl https://repo....
1
vote
1
answer
299
views
Fingerprint reader invoked for login but not for sudo
Ubuntu 22.04.2 LTS
Framework 13
I have enabled the fingerprint reader in Settings→Users and it is invoked whenever I start the laptop, but it is not asked for in Terminal when I am using sudo or ...
1
vote
1
answer
82
views
How to add an Ubuntu user that is administrator and that has sudo access?
I've installed Ubuntu and enabled the home folder encryption, I was working on it and everything was right, but I've changed my password recently and forgot the old one, so I got the home folder ...
1
vote
1
answer
182
views
Ubuntu login loop, but have another user account
I cannot login to my main user account. I have entered the password right. When I enter the password correctly, the ubuntu login window freezes for around 3 seconds and then just returns to the login ...
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 ...
0
votes
0
answers
24
views
Does adding a standard account to sudoers file defeat the purpose of standard account?
In order to avoid elevating privileges to the admin account every time I have to type in a sudo command (occasionally) I was thinking of adding the standard account that I use for everyday activity to ...
0
votes
2
answers
3k
views
How do I run a service as a non-root user at boot, without entering a password?
I have a process that I want to start when the host boots. I want that process to run as a non-root user. And I won't necessarily be around to enter a password on the tty when it starts. Here's my ...
269
votes
11
answers
1.9m
views
How do I start/stop mysql server?
I tried to find in some articles describing how to correctly start & stop mysql server.
I found this link: How to start/stop MySql server on Ubuntu 8.04 | Abhi's Blogging World
I ran this ...
0
votes
1
answer
62
views
Why Did File Owner Change?
Ubuntu Server 22.04
Encountered the following problem during a Linux class:
First lesson: User Management:
sudo useradd -m kaylee
sudo passwd kaylee
su - kaylee
Exited user kaylee, and started the ...
0
votes
0
answers
807
views
Couldn't open intellij as sudo user It shows error: XDG_RUNTIME_DIR not set in the environment
When I try to open intellij as sudo user,
Command : sudo intellij-idea-community
Result:
CompileCommand: exclude com/intellij/openapi/vfs/impl/FilePartNodeRoot.trieDescend bool exclude = true
error: ...
88
votes
8
answers
282k
views
sudo: source: command not found
I've been updating some of the default profile for bash, and saw from the tutorials I was following that I could reload the new profile with the new environment settings by using:
source /etc/bash....
1
vote
3
answers
1k
views
No password prompts in Ubuntu (except login and lock screen)
I would only like a password prompt at login and lock screen (i.e, to make sure others don't use my computer). However, when I am at my computer, I do not want to be prompted at all for my password, ...
4
votes
1
answer
2k
views
sudo select auth method (password vs fingerprint)
In Ubuntu 20.04, after activating and enrolling my fingerprint in Applications menu ->Users and after enabling the fingerprint in terminal using
sudo pam-auth-update
and checking the fingerprint ...
0
votes
0
answers
36
views
oracle cloud service user - cant log back in or use sudo anymore
Im using oracle cloud services
My issue started that i couldnt start a program, then i got to know that the problem was root being the owner. So I needed to change to ubuntu:ubuntu throught command ...
0
votes
0
answers
18
views
How to create a user and give it sudo privileges [duplicate]
By mistake, I removed my own user from the "sudo" user group. Now, every time I try to sudo something, I get ... is not in the sudoers file. This incident will be reported.. I can't sudo ...
1
vote
1
answer
101
views
Forgot sudo password, can't get to grub on boot, can't boot from USB
I don't mind wiping all data.
I have looked up similar issues but can't really find anyone in my situation. Many answers assume I can enter grub menu, others assume you can access the live USB, and ...
0
votes
2
answers
3k
views
Disable sudo user to edit sudoers file
I want to disable a user to edit sudoers file, so I added a line in sudoers file:
Cmnd_Alias BLOCK = !/usr/sbin/visudo, !/bin/nano /etc/sudoers
it blocks if a user tries to edit like this:
sudo ...
1
vote
1
answer
414
views
Errors encountered while processing "key-mapper"
I'm trying to set up vulkan on my Ubuntu VM (running on MacOS Big Sur 11.3.1) and I keep getting this error when running "sudo apt install vulkan-tools".
Here's the entire log:
Reading ...
6
votes
2
answers
8k
views
How to disable sudo authentication via fingerprint in fprint
I have installed fprint for my laptop (thinkpad t450s) and it works very well.
But i mainly want to use it for login, and being able to authenticate sudo with fingerprint is a great addition.
But ...
0
votes
0
answers
751
views
permission denied when activating virtual environment
When typing from local user the following command: 'source .env/bin/activate' returns 'bash: .env/bin/activate: Permission denied'
I can 'sudo bash' and then 'source .env/bin/activate' and that works ...
2
votes
3
answers
6k
views
"PlayOnLinux is not supposed to be run as root. Sorry"
This is the exact message I get in terminal when running sudo playonlinux
Any help?
dps@dps-ubuntu:~$ sudo playonlinux
Looking for python... 2.7.15rc1 - wxversion(s): 3.0-gtk3
selected
1
PlayOnLinux ...
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 ...
0
votes
1
answer
1k
views
How to correctly insert sudo password in sudo command?
I want to log in to user2 via bash script, so my script contains:
sudo -i -u user2
Also I don't want to enter my sudo password by hands. Before I did something like this:
echo "my_sudo_password&...
0
votes
1
answer
415
views
i ran this command " sudo rm -r -f /home/fille/Desktop/"
i ran this command " sudo rm -r -f /home/fille/Desktop/" desktop is gone including the trash bin and i get this error when i try to create a new folder from my desktop," see image 1 &...
2
votes
1
answer
442
views
Piping sudo <command> through another command adds excess whitespace
Background
I wanted to identify if <complex command pipeline> outputs any non-printable characters (it must be run with sudo), so I piped the output through od and was surprised to see each line ...
4
votes
1
answer
7k
views
How do I gain admin access without a root password and no sudoers?
I am running VirtualBox on a Windows Machine, and installed Ubuntu Linux 22.04 LTS. During the install, I set up the initial user. However, there appears to be no way to make this user have admin (...
0
votes
0
answers
29
views
E: Malfored entry 1 in list file /etc/apt/sources.list.d/virtualbox.list (Suite) E: The list of sources could not be read [duplicate]
I was installing virtualbox and when i enter this:
$ echo "deb {arch=amd64} http://virtualbox.org/virtualbox/debian
> (lsb_release -cs)contrib
> (lsb_release -cs) contrib" | sudo tee /...
1
vote
1
answer
382
views
node/nvm/npm installations : sudo vs. user install leads to trouble?
The problem appears to be inconsistency with root and user installed node (v.19.7.0), nvm (0.39.3), and npm (v. 9.5.0) and a specific npm-installed package called svg-path-interpolator on an Ubuntu 22....
0
votes
1
answer
878
views
Can't paste files into a Windows directory while using Ubuntu 22.04
I can't copy files or folders from Ubuntu 22.04 to a Windows partition [D:]
As you noticed I was able to do that, but I reinstalled Ubuntu on an SSD instead of HDD, maybe because the first time I ...
43
votes
3
answers
73k
views
How to umount non-sudo sshfs created directory
I used sshfs without sudo to create a directory like
sshfs [email protected]:/media/user/harddrive /temp/user/harddrive
but when I want to umount the /temp/user/harddrive directory with
umount /...
1
vote
0
answers
150
views
Open GUI as admin
I'm new to linux and I'll try not to make this ranty but is there an easy way to open a GUI app as sudo?
Is it asking for much for the context menu to have "Run as sudo" or at the least &...
0
votes
2
answers
1k
views
Execute a bash script containing the sudo command in rootless docker
I am working in a rootless docker environment and I want to execute a shell script that contains some commands with sudo, but the command sudo is not recognized in my terminal (probably because it is ...
18
votes
5
answers
328k
views
How to run applications as root?
I am having some strange issue with Kate and Kwrite. When I click on Open File, it crashes with segmentation fault.
I am a complete newbie to Linux, and I think the issue is that I am not running ...
1
vote
1
answer
721
views
NOPASSWD option not working in sudoer file
I know this has been asked before, but I tried answers from dozens of other posts, and nothing is working. I've also used this on other servers successfully, so I'm not sure what I'm doing wrong this ...
0
votes
0
answers
21
views
sudo apt update error about cdrom [duplicate]
E: The repository 'cdrom://Ubuntu 22.04 LTS _Jammy Jellyfish_ - Release amd64 (20220419) jammy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is ...
0
votes
1
answer
3k
views
In a bash script, how do I change from root user to another user using su and then exit?
I've looked at How do I run a 'sudo' command inside a script? but this seems to be a different issue.
I want to run a script to change from root to the mastodon user using su, run Rails ...
0
votes
1
answer
779
views
Apps installed via Snap Store don't launch (Ubuntu 22.04)
I have a problem with the Ubuntu 22.04.1 snap store. In fact, every time I install an application using snap store, I can't use it, i.e. whenever I want to launch the application that I have installed,...
5
votes
2
answers
6k
views
How to sudo edit in Midnight Commander?
I have the habit of running Midnight Commander as my normal user (so that I cannot cause too costly accidents).
Sometimes however I find that editing a configuration file in the system partition ...
-4
votes
1
answer
373
views
Error in sudo apt update [duplicate]
I when write sudo apt update give me this error
Hit:1 http://eg.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB] ...
0
votes
1
answer
61
views
In what line of sudoers do I put this?
%newgroup, !newuser ALL=(ALL:ALL)NOPASSWD:ALL, !/usr/sbin/iptables
I have read that it is put at the end, but I am not sure about it
3
votes
1
answer
309
views
Why does installing "pdftk-java" change root certificate authority? Is this bad?
new ubuntu user here. I installed pdftk-java using sudo-apt, and it changed a lot of my root certificate authorities. Is this bad? I don't understand why this root certificate authority is needed by a ...