Questions tagged [sudo]

The sudo command is a program for some Unix and Unix-Like operating systems, that allows a user to execute programs with the security privileges of another user. Typically those of a superuser or the root user.

Filter by
Sorted by
Tagged with
1 vote
0 answers
23 views

Can't use `su` anymore nor use `sudo` after using `sudo apt-get upgrade` (Debian)

I'm having an issue right now. To set the scene : I'm currently working on a V2 for a Rails project, with more recent versions, gems, features etc, working with Nginx and Docker. In order to make it ...
Matthieu CORMELIER's user avatar
-1 votes
0 answers
38 views

Getting error while downloading Java

I am trying to install Java in my AWS EC2 instance by using this below command: sudo yum install java-1.8.0-openjdk-devel But I'm facing the below error: No match for argument: java-1.8.0-openjdk....
user1803282's user avatar
0 votes
0 answers
65 views

Ubuntu password no longer works after login

I recently installed Ubuntu 22.04 on a laptop 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, things like sudo or ...
I.D.M's user avatar
  • 1
0 votes
0 answers
144 views

How to use sudo with sftp through winSCP?

I found a few sources stating that I can use SFTP with a sudo user through an SFTP client (specifically winSCP). This link outlines all the steps I need to take, and it's still not working (https://...
Warsame's user avatar
0 votes
0 answers
57 views

Debian 11: no root access anymore

After trying to reinstall my amd-gpu-drivers, my system rebooted into CLI. So I tried to reinstall GUI with "apt install task-gnome-desktop". After this my system says sudo is an unknown ...
wanna_b_noob's user avatar
0 votes
0 answers
64 views

How do I allow X11 forwarding in root (or with sudo) when accessing Raspberry Pi via SSH?

I have been able to forward X11 through normal executions (e.g. xeyes as opposed to sudo xeyes), but with my purposes I need to access the same applications with root access. I have not been able to ...
Jimmy Bungalo's user avatar
1 vote
0 answers
35 views

why it will cost 60 seconds run every sudo command

After the last system update on my centos, it will almost cost 60s for every command when I use sudo or even login as root. I use strace sudo ls to see what happened, here is some key log mprotect(...
user avatar
2 votes
0 answers
63 views

Running android avdmanager with sudo

I am running avdmanager create avd from my python script that I start with sudo -E to make my script be able to do priveldged stuff. But for some reason avdmanager created AVD inside /root/.android/...
Euler-Maskerony's user avatar
0 votes
1 answer
82 views

how to stop apache2 via kill -9

I know the normal method to start or stop apache2 on linux is: sudo /etc/init.d/apache2 start|stop Or… sudo service apache2 start|stop Or… sudo systemctl start|stop apache2 But, in an emergency, I ...
acgbox's user avatar
  • 711
1 vote
1 answer
82 views

Running updatedb as a nomal user (using the plocate package)

I want a normal user to be able to update the database used by the locate command in Linux. With the previous version of locate (provided by the package mlocate), I achieved this by adding the ...
scaramouche's user avatar
0 votes
1 answer
84 views

macOS: pkill a specific process without sudo?

Because of some recent bluetooth issues, I need to be able to run sudo pkill bluetoothd quite frequently, so I decided to create a shell script Shortcut to have on my menu bar for quick access. I ...
Arber's user avatar
  • 13
1 vote
0 answers
361 views

Kali apt-get update fails with "Clearsigned file isn't valid"

I'm trying to do apt-get update at in result i am getting these errors, tried various methods, couldnt resolve. i need help with this error. Get:1 http://http.kali.org/kali kali-rolling InRelease [18....
Ravi's user avatar
  • 11
0 votes
1 answer
137 views

Terminal not asking for password while using sudo

well it all started yesterday, while i was trying to install larbs installation on a different user. it did not work and i had to delete the other user. when i cam e back to my admin user i realised ...
Axel Fire's user avatar
0 votes
0 answers
79 views

MacOS VNC server without sudo?

Is it possible to run any VNC server on macOS (either built-in or 3rd party) without having sudo or administrator rights? I want to use screensharing from my Home Mac (as client) to my Company Mac (as ...
Dhiraj Gupta's user avatar
1 vote
0 answers
52 views

Run bundle with sudo in MacOS .app bundle

I have a MacOS app that I want to deploy as .app bundle. The binary in this bundle is needed to run with root priveleges. I made launcher zsh script in Contents/MacOS with line sudo ./MyApp. I changed ...
SliFF's user avatar
  • 11
0 votes
0 answers
35 views

Default path for RScript terminal command changes with sudo

I am trying to execute Rscripts from the terminal, but I can only get them to work by adding the sudocommand. Running --verbose, I have been able to narrow down the problem to a difference in the ...
HarD's user avatar
  • 1
0 votes
0 answers
17 views

Is it correct that sudo doesn't work in pipelines and how to overcome it? [duplicate]

Once I tried command.. sudo iptables-save > /etc/iptables/rules.v4 ..to save iptables to some file. Its interesting that I failed to run this command: it said I have insufficient permissions. The ...
MiamiBeach's user avatar
1 vote
1 answer
164 views

How to correct sudo fatal error on Ubuntu after wrong permissions given?

I made a mistake giving wrong permissions on folders (chown I think on the wrong folder) when using wsl and ubuntu. Now I have the following errors when I launch Ubuntu. I really don't know what to do:...
jos97's user avatar
  • 113
0 votes
1 answer
80 views

useradd: create home AND another directory for user

I am aware that a new user's home directory can be created by doing sudo useradd -m -d /home/<username> <username>. However, let's say that I also want to make another non-home directory ...
5Pack's user avatar
  • 101
0 votes
1 answer
272 views

How to run sudo with target user environment AND without password prompt

root@Test:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.5 LTS Release: 20.04 Codename: focal root@Test:~# I'm user1 and need to run ...
Bateman's user avatar
40 votes
3 answers
4k views

What is a good way to initiate `sudo` on demand, so it asks for my password now (when it's convenient) and not later (when it's inconvenient)?

This is hackish. I sometimes need to quickly run programs one after the other in the terminal with some commands needing sudo while others do not, such as: $ command1; c2; sudo c3 | c4; c5 | sudo c6; ...
Majal's user avatar
  • 794
0 votes
1 answer
216 views

using nohup even after a complete shutdown or sudo reboot, Possible?

I am using nohup python -u nationalbiblioteket_logs.py --query 0 > log_q0.out & in my Ubuntu 16.04 machine as an administrator to run really time and memory consuming program. I am already ...
Farid Alijani's user avatar
1 vote
0 answers
105 views

RHEL 8.7 Server Unable to "su root" Consistently

This particular server was set up with the "French National Agency for the Security of Information Systems (ANSSI) BP-028 Enhanced Level" security profile that is packaged with RHEL. After ...
seanm's user avatar
  • 11
1 vote
0 answers
110 views

How do I enable a user account I sudo-ed into to play audio?

So I login to another's user account using the following command: sudo -u bash I use the following command to test sound from that account: [winejail@localhost ~]$ play test.mp3 I get the errors ...
MysteriousMadCoder's user avatar
1 vote
0 answers
875 views

No new privileges flag is set error

I created a new user called jump using sudo adduser jump and then gave it root permissions using: sudo usermod -aG sudo jump. I then switched to my user using: su - jump, and ran: sudo curl -fsSL ...
Haznut's user avatar
  • 11
0 votes
0 answers
23 views

Linux restrict partition

I have 2 ubuntu installs, one of them on a single partition, /dev/sda2, which I want to restrict access from the other ubuntu system. Mounting /dev/sda2 is allowed without root from the other ...
Antoni C's user avatar
2 votes
0 answers
384 views

MIT-MAGIC-COOKIE-1: Doesn't let me run GUI commands as root. What can I do to fix this?

I use the PureOS GNU/Linux distro (based on Debian/Ubuntu). I installed XDM as my display manager. After I logged into a X session as root, I got a bug. I can't run GUI commands as root in a non-root ...
user avatar
2 votes
0 answers
94 views

sudo: command not found on ipad 9.3.5 [closed]

i'm using ios teriminal in ipad 9.3.5. when i'm trying to use sudo command it shows command not found. i had used echo $PATH and it returned /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/...
Chai's user avatar
  • 21
0 votes
0 answers
181 views

wsl kali sudo locked after update

I'm running kali on wsl2. I had just run an upgrade (sudo apt upgrade), which included the line: Updating /root/.profile to current default. The update process ended with an error code: /usr/bin/...
Phenomniverse's user avatar
0 votes
0 answers
17 views

Install wine application launchers in /usr/share/applications instead than /root/.local/share/applications

When I first run a Windows application installer using wine without the sudo command, the application launchers of the installed program go to ~/.local/share/applications while the wine path goes to ~/...
Mario Palumbo's user avatar
0 votes
0 answers
93 views

Linux - Switch user to subuid running LXC container

I'd like to either use su or sudo -u to switch users to the subuid created by LXC to run a container as unprivileged. Note: There is no username assigned to the UIDs in which containers are run. Due ...
Xylem's user avatar
  • 1
0 votes
0 answers
268 views

How can I use sudo on my Amazon Workspaces linux machine?

I'm installing Postgres in Amazon Workspaces linux machine. And I need to run as sudo. After I run the command I get this response sudo: /etc/sudo.conf is world writable sudo: /etc/sudo.conf is world ...
Mike D Hovhannisyan's user avatar
1 vote
1 answer
2k views

sudo: no valid sudoers sources found, quitting

On Amazon Workspaces I ran sudo chmod -R 777 /etc in order to create a file to install Docker but now after every command with sudo I run into this error sudo: /etc/sudo.conf is world writable sudo: /...
Mike D Hovhannisyan's user avatar
0 votes
0 answers
257 views

Execute sudo su - user on a ssh session

I need to execute sudo su - user on a ssh connection, because sudo su - user -c it's not available in the servers. Is there a way to do it? Thank you for the attention.
Antonio Costa's user avatar
0 votes
2 answers
605 views

Error when trying to execute command with sudo su - user -- command

I am facing a problem when trying to execute a command using another user. If I do this sudo su - user direct Works perfectly Now if I do this sudo su - user -c direct I face this error -bash: ...
Antonio Costa's user avatar
1 vote
1 answer
592 views

Sudo and su root not working

I want to use the sudo command but whenever I type it I see a message that says void is not in the sudoers file, this incident will be reported. I tried finding a way to fix it, and the told me to ...
Monetary gain's user avatar
0 votes
1 answer
92 views

Linux mount to FSx using AD user disconnects after interval; initial mount works but message HOST IS DOWN occurs after some time

When I run the mount command I’m able to connect/ls to the share until, what appears to be the ticket renewal, timing occurs. Then I get host is down. I have looked through all the suggested similar ...
Robel Robel Lingstuyl's user avatar
0 votes
0 answers
93 views

I deleted admin user on Mac BigSur with sudo, can I acces files anyhow

I deleted admin user on BigSur, the only user, with sudo rm /var/db/.AppleSetupDone and now can’t access my files. When turn on Mac, it asks me for language and else. I can access Terminal from ...
Jerry50's user avatar
0 votes
1 answer
1k views

sudo -u root init 0:wsl debian bullseye: Couldn't find an alternative telinit implementation to spawn

so, i'm running my wsl on windows 10, and when I type: sudo -u root init 0 i get the error: Couldn't find an alternative telinit implementation to spawn. Neofetch ( no flags or args ): _,met$$$$...
user17512255's user avatar
0 votes
1 answer
166 views

'sudo adduser <user> sudo' succeeds, but still getting '<user> not in sudoers file'

I'm on Debian 10. As root I issued sudo adduser <user> sudo, which succeeded. Repeating the command tells me that user already exists. However, when logged in as and issuing e.g. sudo bash, I ...
Jann Poppinga's user avatar
1 vote
2 answers
348 views

Running Sudowin on Windows 11

It's the first time I need to run Sudowin on Windows 11 and the service won't start. I've tested a sudoers.xml file that runs on Windows 10 with the same language and it doesn't work. It renders the ...
iceburn_pt's user avatar
0 votes
1 answer
191 views

Two users (admin + non-admin) what is the right usage of su/sudo?

I have two users on a macos. U1 is a non-admin user and U2 is a admin user. I cannot add U1 to the sudoers. Is there a way to use U2 to act as if it was U1 issuing sudo <command>? My thinking: ...
geguze's user avatar
  • 101
2 votes
0 answers
97 views

Expose certain bash script commands to other users

I have a bash script named /root/scripts/start-apache containing: systemctl start apache2 sendTelegramNotice "Apache started from the web" echo Done And /root/scripts/stop-apache: systemctl ...
Hendrik's user avatar
  • 21
0 votes
0 answers
38 views

These scripts work on their own but when I try to put them in on script it fails

So I need these in one script. The first operation must be run as super user to run and for the proper permissions, the second operation must be run as the current logged in user. The script gets to ...
tjernigan's user avatar
1 vote
0 answers
19 views

Is there a way to exclude 'sudo' in history expansion?

I'd like to be able to repeat commands that require sudo, but I'd like history expansion to ignore sudo when expanding the command. for example: say I run sudo apt upgrade, and then later when I run!...
bprenticebf's user avatar
0 votes
1 answer
169 views

Why do `sudo` and `sudo -i` treat NOPASSWD differently?

I have an account that needs to masquerade as other accounts seamlessly, like so: manager$ sudo -u worker_A echo hello from worker A hello from worker A manager$ sudo -u worker_B echo hello from ...
Daniel McLaury's user avatar
2 votes
1 answer
305 views

How to configure core dumps (`ulimit -c`) from within sudo within docker

I am having an issue with missing core dumps within docker containers. I have found the root cause of this is sudo resetting the ulimit -c value: /$ ulimit -c 80 /$ ulimit -c 80 /$ sudo sh -c 'ulimit -...
John Howard's user avatar
0 votes
1 answer
440 views

How do I debug a mount failure with permission denied even tho I running with sudo?

How do I debug a mount failure with permission denied given I ran it with sudo? Why would a sudo command ever result in permission denied? $ cd ~ $ mkdir foo bar $ sudo mount --bind ./foo/ ./bar/ ...
Christopher King's user avatar
0 votes
1 answer
125 views

Set date modified of all .DS_Store files in a folder and all its subfolders via terminal?

I'm on macOS Sierra. I'd really love to know how to use terminal to set the date modified of all .DS_Store files in a specific hierarchy to a given date. So far, I know that I can do this: sudo touch -...
MikMak's user avatar
  • 2,027
0 votes
1 answer
81 views

SUDO asks for "Encryption passphrase" on new setup with LUKS

SUDO keeps asking for Encryption passphrase on my latest setup. I'm not sure what encryption the passphrase is for, except that I suspect that it is related to LUKS encryption. Also I noted it doesn't ...
Rohde Fischer's user avatar

1
2 3 4 5
23