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
0
votes
0answers
12 views

Why doesn't team “usermode” work under superuser?

The usermod command successfully through sudo. sudo usermod -aG some_group some_user However, if you execute it through su, then there will be an error. su ...I enter root password... usermod -aG ...
0
votes
0answers
25 views

Linux : how to grant different access to sudo session based on original user

This is might be unusal question, but please bear with me! Background: I am using Redhat Linux server to host my java application. there are 3 users (non root) app_user that runs application ...
0
votes
1answer
45 views

Running cryptsetup commands without sudo permissions

I'm trying to figure out how to run cryptsetup commands without the use of sudo. This is so a non-root user could run a script to unlock and mount two luks-encrypted drives when they are needed, ...
2
votes
1answer
45 views

Why does `sudo env “PATH=$PATH”` do anything at all?

Can anybody explain why this: sudo env "PATH=$PATH" make install is not the same as this: sudo make install ? I had a situation recently where make install failed unless run as shown above. The ...
-3
votes
0answers
26 views

Copied and pasted a string in terminal and now I'm afraid it was malicious

I followed the explained steps in this link to get the pokerstars app, because servers are down now. I read some sort of sudo command (don't know almost anything about it) and now I'm afraid I gave ...
0
votes
0answers
27 views

Whenever I type sudo command on my Kali Linux 2020.1 it doesn't allow me to write further

Whenever I type sudo command on my Kali Linux 2020.1 it doesn't allow me to write further. It just shows this message and it stops reading my commands We trust you have received the usual lecture ...
1
vote
0answers
70 views

How to run Windows program without sudo?

I'm using Windows subsystem for Linux. When I try to run any Windows program from bash, it seems to have no effect : For example, the following does NOT launch notepad.exe (and silently fails) $ /...
0
votes
0answers
5 views

How to launch D-ITG application on Lubuntu 19.04 as root?

I need to launch D-ITG network traffic generator on virtualized Lubuntu 19.04 PC as root. D-ITG desktop screenshot I hoped, that gksudo command would be present, but it's not. Is there a way to ...
0
votes
0answers
11 views

Should zookeeper user be member of sudo group

Just came across this nicely written advice: How To Install and Configure an Apache ZooKeeper Cluster on Ubuntu 18.04 and found it works smoothly. However, as it creates a separate user zk for ...
0
votes
1answer
48 views

remote execution of command failing due to sudo issue

i am running a command from my server which would remotely ssh to by client machine as root and sudo as olcne user and run few commands for validation. I have added the olcne user in sudoer list. i ...
0
votes
0answers
26 views

Set individual password timeout on sudo command

I have a long running script which runs as normal user then then has sudo make install towards the end which (if I don't notice it finishes within 5 minutes) times out and fails. In man sudoers it ...
0
votes
0answers
22 views

user with restricted bash: sudo su works but su doesn't

I'm creating an user with restricted bash. I've blocked all commands except few commands as per a requirement. Now if I want to change to root using su - root, even with correct password, it says ...
1
vote
2answers
49 views

linux sudoers not work on command `su`

I want to disable command sudo and su for user in group staff. So I put this in /etc/sudoers: %staff ALL=ALL, !/usr/bin/sudo,!/usr/bin/su But I found, only sudo work, su still work for user in ...
0
votes
1answer
103 views

Why apt needs sudo for almost every package install/update but Homebrew doesn't?

Why Homebrew doesn't even allow installing packages using sudo brew install foo, but almost every single apt package or tutorial tells to install with sudo apt-get install bar? What's so drastically ...
0
votes
1answer
32 views

What is the difference between a “sudo reboot” command and a “ipmitool power reset” command?

From what I can find online sudo reboot and ipmitool power reset are warm reboot commands Are there actually any differences between these two or are they just the same thing with a different method ...
0
votes
1answer
57 views

Running sudo python and python as SU use two different versions [duplicate]

I understand sudo doesn't run a command as the current user, but I don't understand why the two following commands produce differing outputs: Case 1: user@.../folder$ sudo python Python 2.7.17 (...
0
votes
0answers
30 views

Strange results running an executable as root

I have an Geant4 c++ executable which acts in a very strange way. 1.- If I try to run it as normal user: user@MyPC:~$ ./myExec It runs, but doesn't visualize as it should. 2.- If I run it with sudo:...
0
votes
2answers
43 views

Get the default user name from a script run with sudo

I need to get this user name for my scripts that need to execute some commands without sudo with sudo -u username foo. But I need this username from the scripts executed with sudo. How can I achieve ...
0
votes
1answer
249 views

Delete (remove) Clover created EFI folder in macOS Catalina

I have a couple of folders that were created by Clover when I accidentally selected my OS hard drive instead of the EFI partition when installing an update. Now the root of my main hard drive has EFI ...
0
votes
1answer
85 views

How do I release a blocked sudo user

I use a centos instance for a production system. I do not know how But the root password was enabled or centos user was removed from sudoers. Before I was able to run sudo commands or even run sudo su ...
2
votes
1answer
116 views

sudo -l and sudo -ll output

sudo -l gives me output: User test may run the following commands on server: (root) NOPASSWD: /usr/bin/vim /usr/bin/motd sudo -ll gives me output: Sudoers entry: RunAsUsers: root Options: !...
0
votes
1answer
44 views

How to set the default user for authenticating a pamac command on Manjaro Linux

I recently added another user to my Linux installation, which I myself also use. When I try to execute the pamac command, It has always asked for authentication with this header: ==== AUTHENTICATING ...
0
votes
0answers
16 views

sudo password prompt interference in terminal when attempting tab complete on a command

In the terminal, With sudo -- Running command: sudo systemctl start nam <-- pressing tab here Expected result: sudo systemctl start name.service Actual result: [user@user~]$ sudo systemctl ...
0
votes
0answers
19 views

sudo: sorry, you are not allowed to preserve the environment [duplicate]

I got the error while running sudo -E bash sudo: sorry, you are not allowed to preserve the environment Here is the /etc/sudoers file Cmnd_Alias ALL_CMD = ALL ubuntu ALL = (ALL) NOPASSWD: ALL_CMD ...
0
votes
1answer
30 views

sudo apt-get update && upgrade runs on root, but not with sudo as normal user

Not much else detail to add. Latest release of Parrot OS, I'm curious why I could only get my update && upgrade to run as the root user, when AFAIK using sudo as my normal privilege user ...
1
vote
3answers
136 views

How to run GUI applications as another user on Linux, without SSH and kde/gksudo?

Now that kdesudo and gksudo are disappearing from distributions, what is a reasonable way to run a GUI application as a different user? My use case is that I do not want the application to be able to ...
0
votes
0answers
14 views

Upgrade VERTICA --> update_vertica --> Error: setHost called with empty host list

If you run update_vertica and get the following error you are probably using sudo which break the script. To fix the problem try first: su - root Error: setHost called with empty host list ...
0
votes
1answer
122 views

Solved - sudo into user instead of root with rundeck

i'm configuring a server for some bioinfo analysis on Centos7 and i installed rundeck. Rundeck seems to launch scripts as its own account name and i decided to use the sudo bypass to make it access my ...
0
votes
1answer
276 views

Amazon Linux 2 su command not found

even though I am already working with Linux for years somehow I can't figure out the following issue. I am using the following docker image: amazoncorretto:11.0.6 When going into that image docker ...
0
votes
2answers
85 views

Parse error in sudoers after giving sudo access without password

I am making a desktop application for Linux that interacts with some Ubuntu system files. As such, during the end-user's installation of my software, I need to generate a file in /etc/sudoers.d/ ...
0
votes
0answers
18 views

How to attach a password to sudo process in Alias?

I have the following user that I access to using a predefined alias: alias userP "su pullexec" Literally, every time I give a password of the user pullexec in order to login. I would like to attach ...
-2
votes
1answer
4k views

how to run sudo command in kali 2020.1

I know that kali linux 2020.1 does not support root user. but I have following case when I installed it on my pc (i368) it has black screen login, I tried starting lightdm service but failed. now I ...
0
votes
1answer
62 views

passwordless pkexec to unprivileged user

For several reasons I want to run my browser as a different system user on my fedora box. For now I created a separate system user named sandbox and created a custom ~/.local/share/applications/...
0
votes
0answers
229 views

Issues with sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

I cannot use sudo on my remote AWS EC2 server when I attempt to do any sudo command I receive the error. sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set The problem is I ...
1
vote
1answer
115 views

So i modified my sudoer file and now sudo hangs and I can't change it back

I was having fun messing around in terminal when suddenly, I messed up my sudoers file in /etc/. Now the sudo command hangs and I am not able to change it back. I would rather not reset my computer ...
0
votes
1answer
194 views

sudo doesn't have access to globally installed software

tl;dr I am trying to run a command with sudo, but it only works without using sudo. Read below for more details. Hoping a linux expert might be able to spot the problem here. I installed ef core, per ...
1
vote
0answers
12 views

sudo asks password although there is nopasswd parameter [duplicate]

I edited the sudoers file like below: myuser ALL=(ALL) NOPASSWD: ALL newuser ALL=(ALL) NOPASSWD: ALL There is no another line that contains "myuser" in sudoers file. But ...
0
votes
1answer
94 views

supply password for sudo and openconnect in one alias command

I want to make an alias for openconnect, the alias is echo "password" | sudo openconnect server --user=username --passwd-on-stdin --no-cert-check Everything works fine but my problem is that each ...
0
votes
0answers
2k views

sudo: PAM account management error: Permission denied

I'm trying connect a Linux machine to AD and I made some changes in some files below: /etc/krb5.conf /etc/pam.d/system-auth /etc/samba/smb.conf After these changes I connected the server to AD ...
0
votes
2answers
591 views

Users are able to become root using “sudo sudo su -”

I have given below permissions in sudoers file. Cmnd_Alias SUROOT=/bin/su "",\ /bin/su -,\ /bin/su - root,\ /bin/su root,\ ...
0
votes
1answer
421 views

Cannot install libhdf5-dev (or any hdf5 dependency) on Ubuntu 18.04 LTS (arm64 -aarch64)

I am trying to install hdf5 on Ubuntu 18.04 on Nvidia's Jetson Nano device (arm64 structure). Have attempted to do the basic recommended installation: 'sudo apt-get install libhdf5-serial-dev I have ...
0
votes
1answer
53 views

How can I change user and keep my .profile

I often have to work as root (using sudo), but I want to keep my settings from my login profile - I have had this working in the past, but I don't quite remember how I made it work. This is what I've ...
0
votes
1answer
32 views

Make it so only I can access fstab despite other users having sudo

I have a server that multiple users access. On that server a CIFS drive is mounted through fstab. Mounting the CIFS drive requires sending the password in plaintext. This is not something I can ...
0
votes
1answer
45 views

Difference between deleting folders using sudo or as root

Today I noticed an interesting difference between executing an command using sudo or as root. Using sudo rm -rf /opt/nextcloud/* will not delete folders vagrant@collab:~$ sudo rm -rf /opt/nextcloud/...
0
votes
0answers
15 views

Adding user to group without breaking the script

I'm trying to write installation script for our workspace. Many of our automated scripts run docker without the sudo command as they were used locally and it was not a problem to set up the ...
2
votes
1answer
264 views

Become root on ssh client

I'm trying install an agent named cloudamize with a bash script to our linux machines. There is two commands for this process: export CLOUDAMIZE_CUSTOMER_KEY=<my_customer_key> bash < <(...
0
votes
2answers
168 views

not in the sudoers file

I added a user to the sudoers file using ['sudo gpasswd -a orca wheel']. This command was successful as per ""Adding user orca to group wheel"" but the user can not execute root commands still. I ...
0
votes
1answer
121 views

Sudo not working on CentOS 7

so my school had me try to disable root login by editing /etc/passwd file, root:x:0:0:root:/root:/sbin/nologin the plan is to have me use sudo commands to then revert this change. but since doing ...
0
votes
0answers
36 views

How comd `command` works but `sudo command` doesn't?

I followed the guide on how to install jupyterhub here https://jupyterhub.readthedocs.io/en/stable/quickstart.html and I managed to install jupyterhub with conda. So far so good. I can jupyterhub ...
0
votes
1answer
76 views

a change with visudo doesn't work

I issue visudo command, add this rule to the very end of the file, save the file and quit. newuser ALL=/usr/sbin/useradd However newuser is still able to run such commands as sudo touch file1 ...

1
2 3 4 5
20