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.
674
questions with no upvoted or accepted answers
7
votes
1
answer
571
views
Is sudo -i less secure than pkexec?
I just heard that it isn't recommended to use sudo -i on GUI programs - because it's less secure.
Is there any truth here - is there an advantage to this:
sudo -i gedit /random/file.name
over
...
6
votes
0
answers
6k
views
Allow a regular user to mount VeraCrypt volume without admin privileges
A regular user is unable to mount a VeraCrypt volume without first authenticating with an administrator password. According to the original TrueCrypt documentation, the workaround is to give the user ...
5
votes
0
answers
468
views
Sudo hangs, internet disappears, and computer cannot be shut down after computer has been asleep for a long time
Sorry in advance for the lack of detailed technical info here - I'm doing my best but I'm relatively new to linux troubleshooting.
I'm using Ubuntu 21.10 (specifically the Ubuntu Budgie DE, in case ...
5
votes
1
answer
7k
views
Getting error while running sudo commands, from /etc/sudo.conf file
I want to run commands in terminal with sudo and get in this error for running sudo commands:
sudo su
sudo: error in /etc/sudo.conf, line 16 while loading plugin "sudoers_audit"
sudo: ...
5
votes
0
answers
5k
views
Using setfacl to give a user full permissions on a folder owned by root
How do I give a user to do whatever they please inside /var/www/myapp folder, which is owned by root, considering that I don't want to change the owner?
I have setup TeamCity CI. It runs under user ...
5
votes
1
answer
3k
views
How can I run dotnet on ubuntu without using sudo?
I've been trying to update the permissions so that I can run a command (specificially dotnet restore). I'm not sure if this issue is specific to running dotnet, or if it is more generic.
I can run ...
5
votes
0
answers
12k
views
EC2 sudo unable to resolve host
I have this issue on AWS on Ubuntu 16.04-amd64-server. Whenever I run sudo the terminal is stuck doing seemingly nothing, giving me the following error:
root@ip-10-20-54-234:/home# sudo -s
sudo: ...
5
votes
1
answer
1k
views
How is the guest account prevented from using su and sudo?
It's already known that the guest account can't use su or sudo:
Why is su disabled from guest sessions?
Sudo not available in guest login
How is this done?
My guess would be apparmor. However, ...
5
votes
0
answers
776
views
How to disable mpm-itk for a specific virtualhost?
I've a main site on a server that needs to run a sudo command which I white listed via visudo. That worked fine until I installed apache-mpm-itk and then I started getting the following error:
sudo: ...
4
votes
0
answers
746
views
`sudo` outputs strange message since update to 22.04 on wrong password
Since release upgrade (update) to Ubuntu 22.04.1 LTS,
using sudo,
but mistyping the password, so using a wrong password,
leeds to the following additional output:
## any command seems to work, tried ...
4
votes
1
answer
20k
views
Unable to sudo apt-get update for Ubuntu (Windows subsystem for Linux)
Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Temporary failure resolving ...
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 ...
4
votes
0
answers
701
views
Configure pkexec to only prompt for password once
When using sudo there is a timeout where you don't have to type the password again for x minutes when you run sudo again. Is it possible to get the same thing for graphical applications which use ...
4
votes
0
answers
268
views
How do I restrict specific passwordless sudo sub-commands?
Is there a way to restrict the passwordless sudo commands to a set of "sub-commands".
I am not looking for the answer to How do I run specific sudo commands without a password? I want to know if I it ...
4
votes
0
answers
1k
views
How to allow ZSH to autocomplete ZFS
System:
I'm running Ubuntu 16.10 with ZFS and ZSH installed.
Expected behaviour:
As the root user, I can press tab to autocomplete zfs commands and paths. It works both in zsh and bash. As a non-root ...
4
votes
0
answers
743
views
installing python fails with permission denied (using sudo make install)
I tried to install Python 3.6 using this tutorial: https://www.programiz.com/python-programming#run-python-os on ubuntu 14.04.
Running
$ ./configure
and
$ make
went fine. Running
$ sudo make ...
4
votes
1
answer
2k
views
Ubuntu for Windows 10
I am new to using Ubuntu for Windows 10. I have been trying to be able to run cron on the unix but I am getting a
cron:can't open or create /var/run/crond.pid: Permission denied
This is happening ...
4
votes
3
answers
4k
views
Can't Use SSH Keys Unless Running SSH With Sudo
For some reason I'm unable to SSH from my Ubuntu 15.10 machine to a remote server using a private key if I run ssh without sudo.
Server side config is fine. I have tested the private key from my ...
4
votes
1
answer
8k
views
How to add Active Directory users as sudoers
I'm following this article. What I've done:
I can connect to Active Directory
I can login to the Active Directory
Now what I'm looking for is a way to make any active directory user a sudoer. I'm ...
4
votes
1
answer
8k
views
What causes “pam_unix … conversation failed” in auth.log
There are thousands of entries in my auth.log like this:
sudo: pam_unix(sudo:auth): conversation failed
What causes these to occur? I'd like to fix whatever it is but I'm a bit mystified as to where ...
3
votes
1
answer
2k
views
Oracle Cloud - Why can I use sudo without a password?
I have a new user account created on an oracle cloud free tier VM, called testacc. This account is a member of the sudo group, and the testacc group. Password login is disabled, and I log in with a ...
3
votes
0
answers
921
views
No problems logging in, but sudo gives authentication failure
So to start things off I have had a server running Ubuntu 18.04 for the last two years or so running just fine.
I was logged in to it last night copying some files to my NAS and doing a few other ...
3
votes
0
answers
72
views
sudo stopped working after a failed dependency update
sudo stopped working after I have tried to update a dependency from libc6XXXX to libc6YYYY, required by an experimental text editor.
On the first try, it didn't work and apt-get suggested I use the --...
3
votes
0
answers
1k
views
"sudo su -" vs. "sudo -i" and /etc/environment
On an Ubuntu 14.04 host that I frequently update (apt-get update followed by apt-get full-upgrade) I have an /etc/environment file with some critical variables in it.
Until recently sudo -i -u fred ...
3
votes
1
answer
418
views
Password checking takes long even though it's not wrong
I'm aware that there is an intended delay when entering a wrong password. However, since about yesterday, my Ubuntu 16.04 takes 10-20 seconds or sometimes even more to verify the password, even though ...
3
votes
0
answers
3k
views
Dpkg::Options::="--force-confold" for just a specific package?
I normally edit my /etc/sudoers file to include my username with some options.
When using apt-get to upgrade, I get the prompt to choose the newer version (dist-version) or my edited version, if the ...
3
votes
0
answers
3k
views
Why does reboot require sudo but shutdown does not?
I use Ubuntu 16.04. and 18.04. LTS and I was wondering why I have to be sudo to reboot (i.e. sudo reboot) but that the shutdown command does not require sudo. I can use any of its variants like ...
3
votes
0
answers
3k
views
Execute a command as another user by providing THEIR password
I need to execute a command as another user by providing THEIR password. This must be able to be done without a terminal aka purely through bash script. I also need to be able to do this without ...
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 ...
3
votes
0
answers
2k
views
Why is neither /root/.bashrc nor /root/.profile executed after sudo -i?
I have export PATH="$PATH:/opt/local/bin" in /root/.bashrc and /root/.profile (nothing else in /root/.profile) and /bin/bash is the login shell for root in /etc/passwd. Yet invoking sudo -i (which ...
3
votes
1
answer
264
views
Problem installing reader software for Estonian ID card for ubuntu 14.04
I updated my ubuntu 13.10 to 14.04 and now I have problems to install Estonian ID card reader software.
When I trie to use the installation script, that I have downloaded from https://installer.id.ee/...
3
votes
0
answers
2k
views
Reset sudoers file
I want to add a new user to run all commands without a password, so I went to edit /etc/sudoers (using visudo of course) by adding the line myuser ALL=NOPASSWD: ALL.
Everything is OK, but 15 minutes ...
3
votes
1
answer
2k
views
Can't start program without using sudo
I have monodevelop 5.7 installed on my computer with ubuntu 14.10, but when I tried run it from launcher and from the command
~$ monodevelop
they didn't work.
But when I used the command
~$ sudo ...
3
votes
0
answers
204
views
Entry in sudoers
I need the following entry for a autoresponder/vacation plugin for roundcube with plesk:
www-data ALL=NOPASSWD: /opt/psa/bin/autoresponder
But the system doesn't recognize www-data as a user. Only ...
3
votes
1
answer
513
views
Eclipse Juno won't open gui java apps when run with gksudo
I have Eclipse Juno installed on Ubuntu 12.04.
When I run from the command line with sudo, everything works fine. However, when I follow the advice I see everywhere and run it with gksudo, I get the ...
3
votes
2
answers
3k
views
How to pass arguments in a script using gnome-terminal
As part of a script I have
gnome-terminal -e "process involving another user"
Once executed this line, I have to write in the terminal 3 times the password of this user. I wonder how can I ...
2
votes
0
answers
50
views
Sudo access using AD without using FQDN
I've been able to get my server setup where it will allow me to use my AD credentials to login, and sudo works as well, but only if I sign in using [email protected].
I changed the /etc/sssd/sssd/...
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 ...
2
votes
1
answer
529
views
Is there a way to use the Fingerprint reader authentication for sudo and other situations, today is only useful at the login
I am using Ubuntu 22.04 LTS with the XPS 13 Plus 9320
2
votes
0
answers
111
views
Can't build my react in ubuntu without sudo
I have a react project and want to get a build. When I run
yarn
to install packages, it works fine and installs all packages. after I run
yarn build
, I get so many nonsense typescript errors like ...
2
votes
1
answer
193
views
Selectively enable sudo without password
On my Ubuntu system I followed the instructions for enabling sudo without a password.
It is working well, or should I say too well.
I have a couple of users, say userA and userB, who have been added ...
2
votes
0
answers
377
views
Open terminal and run sudo command on startup
I have a custom command script called uua, that I put in /bin, and made it executable with chmod +x. I want my console to launch on startup and run the uua command, without me putting in the password ...
2
votes
0
answers
1k
views
How do I change the editor form vim to nano?
While using the command sudo apt edit-sources, accidentally chose vim instead of nano and don't know how to change it. I used sudo update-alternatives --config editor but it doesn't change the editor ...
2
votes
0
answers
3k
views
There was an error while getting the sharing information
I’m taking backup by Ubuntu 2.02
And it’s done. But when I open this folder’s properties then a notification appears.
Notification is given below:
There was an error while getting the sharing ...
2
votes
0
answers
931
views
sudo hangs without (not prompting password)
I am on Ubuntu 18.04.5 LTS.
Originally my problem was, that my WLAN didn't work anymore, so I was browsing through ask-ubuntu to find a solution just to realize that sudo hangs without prompting my ...
2
votes
0
answers
361
views
Accessing wpa_supplicant using wpa_cli without sudo
I am using wpa_supplicant service to connect with wifi networks in ubuntu 18.04. Its configuration file is as below.
ctrl_interface_group=sudo
ap_scan=1
fast_reauth=1
update_config=1
p2p_disabled=1
...
2
votes
1
answer
628
views
sudoers doesn't work
I added powertop to /etc/sudoers (sudo visudo) but it doesn't work. I checked all possible problems I can imagine. What did I missed?
user@ellie:~$ whoami
user
user@ellie:~$ groups
user adm cdrom ...
2
votes
1
answer
596
views
Server 19.10 on Raspberry Pi 4 defaults to root?
I've successfully installed Server 19.10, then got a desktop (Lubuntu) going on a single Raspberry Pi 4 (4gb). I went with the 32-bit version, having heard the 64-bit is not very stable. (Please ...
2
votes
1
answer
880
views
sudo with dash gives bad substitution
I tried to access a newly installed system via Emacs' Tramp the way I do it with all my other system:
C-x C-f /ssh:server|sudo:root@server:/etc/network/interfaces
This command timed out. After some ...
2
votes
1
answer
2k
views
Always getting an error every installing expo-cli
So, basically, I always get an error every installing expo-cli through an npm or yarn, I wonder how to fix this error, Thank You.
Using NPM :
npm WARN deprecated [email protected]: This version has been ...