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
0 answers
85 views

How to run shell script as regular user and then exec sudo in shell script?

How to run shell/bash script as normal user and exec sudo no password in the script
Z. Neuf's user avatar
  • 11
0 votes
0 answers
191 views

umask 027 and the sudo user

This is sort of a follow on question to What permissions would change if I change umask to 027 from 022? Our IT has changed umask from the default 022 to 077 and then to 027 after enough complaints ...
schrödinbug's user avatar
0 votes
0 answers
100 views

Error in permission, sudo and space problem in Ubuntu v20.04.6

I am trying to give you all the info.. I am quite new on all these things... Last week I received this while I was trying to install a package on R: R error: Installation paths not writable, ...
Deb's user avatar
  • 1
0 votes
0 answers
31 views

When I do an update on ubuntu "sudo apt update" appears like this what is the solution.? [duplicate]

Reading package lists... Done E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1165 (packagekitd) N: Be aware that removing the lock file is not a solution and may break your ...
wasep's user avatar
  • 1
0 votes
0 answers
43 views

ubuntu:ubuntu owns "/" - all server files

So recently, I made a mistake. I did; sudo chown -R ubuntu:ubuntu / Now, my server is pretty non-functioning, and the fact that my server is using 100% of it's space, doesn't make the situation any ...
oli_seacastle14's user avatar
0 votes
0 answers
382 views

Unable to run systemd service without password despite NOPASSWD in sudoers file

I am running Ubuntu 20.04.6 LTS and added a custom service file for systemd. I want to start/stop it without entering a password. I checked several posts here and on other StackExchange instances but ...
Apollo's user avatar
  • 101
0 votes
0 answers
85 views

Unable to create the file /sys/class/net/<device>/device/sriov_totalvfs file in Ubuntu 22.04

I gave all permissions to all files and folders in /sys/ directory, but still I'm unable to create any file in the /sys/ directory too in Ubuntu 22.04. I'm trying to create an sr-iov interface, when I ...
user41965's user avatar
  • 333
0 votes
1 answer
217 views

New user on newly created server, added to sudo group but still no sudo access

I created a new server (ubuntu-s-2vcpu-2gb-nyc1-01) with Ubuntu 22.04 and added a new user (michael). I then added the user to the sudo group. When I check the groups for michael I see the correct ...
Michael Goodin's user avatar
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, ...
I.D.M's user avatar
  • 1
1 vote
1 answer
313 views

SUDO_ASKPASS not working

I would like to create a simple script to download and install a program over ssh. #!/bin/bash echo "Welcher Rechner?" read nummer echo "Verbinde zu APC "$nummer apc=apc$nummer....
DonPIZI's user avatar
  • 11
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: ...
AManko's user avatar
  • 1
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 ...
Sketch's user avatar
  • 1
0 votes
1 answer
908 views

Issue with AAD login and sudo

We are experiencing a following issue: when we are using AAD user with Azure Active Directory Authentication for Ubuntu module - it is not possible to use neither sudo in terminal nor unlock any ...
Uladzimir Radziuk's user avatar
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 ...
Ahmet Hakan YILDIZ's user avatar
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 ...
Mainland's user avatar
  • 133
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 ...
QRP's user avatar
  • 96
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....
Prithvi Boinpally's user avatar
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 ...
Kaylee's user avatar
  • 63
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 ...
Nameless's user avatar
0 votes
2 answers
1k views

Ubuntu 22.04: sudo not asking for password with empty sudoers.d and no "NOPASSWD" entry in /etc/sudoers

Weird thing, lately I noticed that every time I run a command with sudo, it doesn't ask for password. Thing I've checked: /etc/sudoers.d = empty myuser@MYPC:/etc/sudoers.d# ls README myuser@MYPC:/...
Andrea Turbiglio's user avatar
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: ...
velmurugan A's user avatar
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 ...
John's user avatar
  • 1
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 ...
Milan 's user avatar
6 votes
2 answers
4k views

Installing Ubuntu 22.04 in VirtualBox causes the account to be not a sudoer nor a root user

I have just installed Ubuntu 22.04 in my VirtualBox and created only one account, say "A". Although A is the only user in the system, it is not in the sudoers file because when I run "...
Ron Gu's user avatar
  • 63
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 ...
Alejandro Veintimilla's user avatar
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 ...
SebMa's user avatar
  • 2,291
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 ...
Kepol's user avatar
  • 111
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 ...
kegdeg's user avatar
  • 1
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....
Bryan-StackExchange's user avatar
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 ...
Mostafa Ahmed AbdulRazik's user avatar
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 /...
Marisol Alfaro's user avatar
1 vote
0 answers
151 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 &...
parliament's user avatar
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 ...
user avatar
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 ...
Jared's user avatar
  • 113
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 ...
Dilshodbek Sobirjonov's user avatar
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 ...
BlueDogRanch's user avatar
-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] ...
MohamedAshraf's user avatar
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
Dabro's user avatar
  • 1
1 vote
2 answers
153 views

Root invalid default shell

We have a server with ssh enabled, and we have: PermitRootLogin: no, and a user that is not in sudoers file. Another administator set invalid Shell for root so I can't get root access anymore. When I ...
Ivan's user avatar
  • 15
0 votes
1 answer
47 views

Root directory permission changed [duplicate]

i just typed "sudo chmod 744 /" and by mistake i hit the enter button Now every time I run sudo command I get "Permission Denied" error bash: /usr/bin/sudo: permission denied I ...
Ritesh Tiwari's user avatar
0 votes
0 answers
19 views

Nothing shows up in the terminal when password is required for sudo installation [duplicate]

I am a new Ubuntu user and calendar command does not work on my Ubuntu so I install sudo, but it asks for a password. When I try to type the password nothing shows up in the terminal except for a new ...
Fatima Ali's user avatar
0 votes
1 answer
119 views

Sudo ask password for an app if it was typed in NOPASSWD option with visudo

First of all, I have succeeded to eliminate sudo password from all apps simply: I create a new file in /etc/sudoers.d with sudo visudo -f /etc/sudors.myfile with the line: ghegheg ALL= NOPASSWD: ALL ...
Mitu Gabriel's user avatar
0 votes
2 answers
2k views

Temporary admin/root privilege from non-sudoers account?

I've been using Linux on and off (almost exclusively off) for over a year. From everything I've read, including this, you can only get temporarily elevated privileges if your account is an "...
user2153235's user avatar
1 vote
0 answers
255 views

Alternatives to sudo's password prompt?

I know sudo can be setup with NOPASSWD so that it will not ask for a password when executed. This is more of a security for a person with ADHD/ADD rather than 'best security' - I understand the false ...
Lockszmith's user avatar
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 ...
Daycent's user avatar
  • 83
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 (...
Ryan Bruner's user avatar
1 vote
1 answer
2k views

Unable to access sudo in Ubuntu virtual machine [duplicate]

I installed Ubuntu 22.10 desktop version on Oracle Vmware. I am unable to use the sudo command since I am not in the sudoers list. Solutions on the internet suggest entering the root mode using su ...
Yash Khasgiwala's user avatar
1 vote
2 answers
95 views

Terminal not displaying directory, commands executing instantly when pasted; arrow up ==> ^[[A [duplicate]

I'm using Ubuntu 22.04.1 LTS. I created the user "dom" when I first set up Ubuntu. From then, I created another user, named "schule" that also had sudo rights. Here is how I ...
User1986's user avatar
  • 321
0 votes
0 answers
89 views

Jetson AGX Orin Backup without sudo cmd, no jetpack/sdkmanager

I made an error when trying to change file permissions. I did "sudo chmod 777 -R / " and now I can no longer use “sudo” because when I try, I get this “/usr/bin/sudo must be owned by uid 0 ...
Vaishnavi's user avatar
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 ...
Unique's user avatar
  • 175

1 2
3
4 5
58