Questions tagged [sudo]

sudo - Execute a command with superuser privileges.

Filter by
Sorted by
Tagged with
0 votes
0 answers
3 views

Include FUSE mount in updatedb

I want to create a locate database that includes all mounted drives, including a FUSE mount from borg, but I get the following: $ sudo updatedb --debug-pruning -o /var/cache/locate-all.db -l 0 -U $PWD ...
user avatar
  • 395
0 votes
1 answer
17 views

Run root script from www-data user

I have a problem to run a command that requires root privileges via php on the apache server I added a command to sudoers so that it does not require a password for the user visudo: # # This file ...
user avatar
0 votes
1 answer
18 views

curl pipe script forks a new Terminal window

I have a script which unexplainably forks a new Terminal instance on some Linux distributions... I'd rather it doesn't do this. Oddly, when I run the script directly (./install.sh) the additional ...
user avatar
  • 213
3 votes
0 answers
67 views

Sudo won't accept correct password

I'm having a weird problem; sudo isn't accepting my absolutely correct password on my new Kubuntu install. This happens in terminal and in graphical sudo prompts, like if you double click a .deb or ...
user avatar
0 votes
1 answer
25 views

Why did chown mess up my sudo.conf?

My machine has 2 NVMe drives. During install, I loaded everything onto one of them and left the 2nd one untouched. I figured this would be a good way to learn about mounting drives after install. So I ...
user avatar
0 votes
2 answers
29 views

Tilde not returning home directory

After sudo command to change user, Tilde (~) not returning current user's home directory but returning previous login user's home directory. I needed to expand with echo ~USERNAME but I need to make ...
user avatar
0 votes
1 answer
44 views

Find all binaries that require root privilege in a freshly installed Ubuntu 20.04 LTE

I am currently looking for the simplest way to find all binary files in /usr/bin and /usr/sbin directories that require root privilege to run, which means I should run them using sudo or by being root ...
user avatar
0 votes
0 answers
26 views

can something like --rsync-path be done with scp?

scp is handy sometmes because of its -3 feature. Systems here are configured to disallow root login, however sudo is configured to allow certain folks to pass --rsync-path=sudo\ rsync. i'd like to ...
user avatar
  • 51
7 votes
4 answers
645 views

Save file changes if you forgot to use sudo [duplicate]

I am using Nano. Sometimes I make changes to a file and then after attempting to save I realize that I need sudo permissions. Then I need to close the file, reopen it as sudo and make my changes again....
user avatar
  • 1,708
1 vote
1 answer
45 views

Is there a command to get the current memory address of the current shell script/command?

I wanted to do some protection against the memory dumping when users can recover my shell script's commands using the (delete) tag and then recover it from its memory address. So I thought it could ...
user avatar
  • 111
0 votes
1 answer
34 views

How to add user to have super user permission

I am using OpenSuse linux 12.3 version & i have created new user called jenkinsadmin. with this account i am unable to create a folder/file inside /usr, /opt, /var locations . To enable sudo ...
user avatar
  • 1
0 votes
1 answer
25 views

sudoers - when command is run as a specific user

I wish to keep certain environment variables when a certain command is run as a certain user under sudo. man sudoers seems to suggest that Defaults can do this, if I've read the paragraph copied below ...
user avatar
  • 149
0 votes
0 answers
22 views

sudo logging sudo-io sometimes creates huge timing files

I have set up sudo- log_output logging using the following settings: Cmnd_Alias NOLOG = some commands like cat etc. Defaults log_output Defaults! NOLOG !log_output It works mostly okay, but ...
user avatar
1 vote
1 answer
34 views

In what context can I see effect of sudo's "--preserve-groups" option?

Given the following users: $ whoami admin $ groups staff everyone admin groupA and $ whoami user $ groups staff everyone groupB I'm trying to understand what exactly the --preserve-groups option ...
user avatar
  • 183
0 votes
2 answers
33 views

Prevent wakeup from suspend via a service

I meant to avoid my laptop waking immediately after suspend. I managed to do so as shown here. The contents of the script disable_devices_from_wakeup.sh I am using is #!/bin/bash declare -a devices=(...
user avatar
0 votes
0 answers
49 views

After failure in "apt upgrade", sudo doesn't prompt for password. How do I fix?

While doing a "sudo apt upgrade", I got a message "error while loading shared libraries: libcrypt.so.1". When I came back to it some minutes later, if I try to run sudo I now get: $...
user avatar
  • 2,912
0 votes
0 answers
79 views

Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) (running as sudo)

I am trying to install Veeam Agent on a fresh Lubuntu 20.04 installation. I've downloaded the latest Veeam package, but get this when I try to install: ~/Downloads$ sudo dpkg -i ./veeam-release* &...
user avatar
3 votes
1 answer
267 views

How do I remove reboot, halt and shutdown privileges using visudo?

I am trying to take reboot privileges away from the user Rick. I have tried both ! and NOEXEC. Is there another way to do this? Rick ALL = (ALL) !/sbin/reboot Rick ALL = NOEXEC: /sbin/reboot
user avatar
1 vote
1 answer
325 views

ldconfig --> sudo: you do not exist in the passwd database

Ok, I made a mistake and I'm struggling to fix it: I was looking for a libGL.so to link a project, and found it in a (conan-related) package that is mounted during build time. The default system /usr/...
user avatar
  • 121
0 votes
1 answer
60 views

How do I install Roccat Vulcan 100 keyboard driver for light effects?

Here's the driver (it is called a "driver", isn't it?) for keyboard backlight. I'm mostly interested in playing with the source code to understand something more about drivers, if possible. ...
user avatar
  • 1,012
1 vote
1 answer
20 views

Can deleted groups still function through primary groups in Linux?

With an analyzing program I built, I ran into a bug where a user had a primary group set to a since then deleted group (no longer in the /etc/group file). To scope the impact I ran some tests and run ...
user avatar
0 votes
0 answers
23 views

Giving superuser access to user directory binaries

I am new to linux. I have installed rust on a linux box (AWS EC2) using the official documentation. The binaries are installed in my home directory and the paths have been added to the $PATH variable. ...
user avatar
1 vote
1 answer
55 views

Prohibit sudo commands when run from a SSH session

Is there a way to prohibit sudo commands when issued from a SSH session specifically, while allowing them from local terminals? I looked at the sudoers and sudo.conf man pages and search for "...
user avatar
0 votes
1 answer
53 views

problem with installing a repository on remote server with CentOS 7 without root permission

I am trying to install Chipyard Toolchain on a remote system with cshrc. I am connecting to it via ssh. All the required dependencies were already installed on the system. I checked them with rpm -q ...
user avatar
0 votes
1 answer
40 views

Help me understand the permission syntax in sudoers file [duplicate]

Based on the file itself: Next comes the main part: which users can run what software on which machines (the sudoers file can be shared between multiple systems). Syntax: user MACHINE=COMMANDS ...
user avatar
  • 111
0 votes
2 answers
24 views

Limiting sudo permissions of a user within a group that has broader permissions

Long story short, the admins group is used for SSH authentication and for determining sudoers permissions. All members of the admins group should have unlimited sudo access, except for jsmith. jsmith ...
user avatar
1 vote
2 answers
40 views

Sudo Help - normal user should not change root password as sudo

I am adding sudo rules for L0 team wherein they will be able to change password for OS users. BUT i dont want the L0 team to change root password using sudo How to do it PS - !/usr/bin/passwd root - ...
user avatar
0 votes
1 answer
57 views

How do I login as the root user?

I installed Debian a day ago and I'm very new to Linux please forgive me if I miss something obvious but: whenever I use sudo command it asks me for the current user password but the current user ...
user avatar
0 votes
0 answers
42 views

Running command as different user with sudo but without root session?

I am going through this article and I am a bit confused if this will matter with i use -s -i together with -u flag. We have 2 users, one is our personal user, and one is the application user. We don't ...
user avatar
0 votes
0 answers
57 views

undo usermod for root?

At some point where I wanted to do sudo usermod -v 1000-1000 USER sudo usermod -w 1000-1000 USER I accidentally applied both these commands to root. According to the documentation I can undo these ...
user avatar
4 votes
3 answers
1k views

passwordless check to see if a user can use 'sudo'

I want to check if a user is able to use sudo - but without the need to write the password - for bash shell scripts purposes. I did some research and I found: Sudo - is there a command to check if I ...
user avatar
0 votes
0 answers
35 views

Give program/user rights for specific tasks

I'm writing a program that needs to perform some privileged operations without inserting any password, for example: use systemctl commands run superuser commands read/write files owned by root user ...
user avatar
  • 101
0 votes
0 answers
46 views

Execute command as user and not su

Currently my computer allows me to mount network drives only with sudo, which is a huge pain because then I only have read access to the drives as long as I don't sudo open/edit/delete/add files on ...
user avatar
0 votes
1 answer
28 views

How to update user password with the file has password,without prompt key in?

I am using Debian 11,set password with shadow. I random generate password into file pas: cat pas "Th3P@ssw0rd" When I update password to normal user has sudo privilege, sudo passwd username ...
user avatar
  • 111
1 vote
1 answer
42 views

Why are environment variables being passed to sudo session and is it a concern?

I came across some readings about how allowing environment variables to be passed to root when sudoing is a security concern. This led me to check my environment to make sure I had the proper setup. I ...
user avatar
0 votes
1 answer
84 views

How to properly open files/applications as root?

When I try to open a file manager as root calling, for instance, sudo thunar the units at left appear with no labels (also some that shouldn't appear, like dev, pts, proc, sys): If I call sudo dbus-...
user avatar
  • 111
-2 votes
2 answers
162 views

Can't install anything with apt-get on Kali

I tried running sudo apt-get install apktool and got: Reading package list... Done Reading dependency tree... Done Reading state information... Done E: Unable to locate package apktool I ran sudo apt-...
user avatar
0 votes
1 answer
20 views

how to sudoers drop_caches w/o proxy script?

not echo 3 |sudo -k tee /proc/sys/vm/drop_caches as we cant ensure if it will be "3" the value passed. So, from where could I grantedly get the "3" text and how to write it at ...
user avatar
0 votes
2 answers
29 views

Passwordless sudo does not seem to be working

I am running Centos 8. I have used various instructional documents, such as the below: https://www.cyberciti.biz/faq/how-to-sudo-without-password-on-centos-linux/ in an attempt to be able to ssh to an ...
user avatar
1 vote
1 answer
95 views

Ubuntu SFTP Client with sudo capability

Recently I completely switched to Ubuntu for my work computer. But I have one problem. On Windows I used WinSCP to connect to remove development server via SFTP and I can't find any app for Ubuntu ...
user avatar
1 vote
1 answer
101 views

How to enable sudo privileges for user group to apt-get install anything

I want to give a group permission to install software without needing to input a root/sudo password. I'm on Linux Mint 20.3 Cinnamon. I have created a group called "basicsudo". I first typed ...
user avatar
1 vote
1 answer
31 views

A question about sudo and pass the password to command

Most user said is easy to pass password for sudo command using this cli sudo -S <<< "yourpassord" yourcommand or echo "yourpassword|yourcommand Those cli works for a lot of ...
user avatar
  • 10.9k
0 votes
0 answers
41 views

13G Sudo File in Home

I have no idea why and I can't find anything about what it is, I don't want to delete it because I don't know if it's important. It's not the same as /usr/bin/sudo Random system info: I'm on arch ...
user avatar
  • 1
0 votes
1 answer
81 views

I need to run ~$ sudo nano in order write and save a file and can't do so with just the nano command. How do I change this?

To make the question better understood -> I currently have to run nano with sudo when i just want to run nano to edit a file. So while I was fiddling with Ubuntu 20.04 in a VM I had everything more ...
user avatar
  • 3
0 votes
1 answer
54 views

sudo command in terminal freeze for a couple of seconds

Recently have my Ubuntu server begun to "think" (2-5seconds) when I'm entering an command that normally would be executed within milliseconds if I for example starts sudo nano, it delays 2-3 ...
user avatar
1 vote
1 answer
41 views

How to call many shell functions from sudo?

I have a huge alias file sourced by ~/.bashrc or ~/.zshrc which contains both simple aliases and more functions for more complex stuff: # example aliases alias "sudo=sudo " alias "...
user avatar
  • 135
1 vote
0 answers
18 views

sudo -E env not printing my PATH

I read the manpages but maybe I didn't understand them.. why is sudo -E env PATH="$PATH" echo "$PATH" printing out my environment variables but sudo -E env MYPATH="$PATH"...
user avatar
  • 294
0 votes
1 answer
58 views

Is there a default GID for wheel group on Debian Linices?

I know Debian doesn't use the wheel group by default, but I'm to the bottom of my todo list for securing some old operating systems that I don't want to rebuild from scratch and running the CIS ...
user avatar
  • 1,444
2 votes
1 answer
268 views

Running "su command" as another user

I have a user user1 which is part of wheel group and has all the root privileges . user1 is able to change password for user2 using the below command (My understanding is that here passwd is run as ...
user avatar
  • 151
1 vote
1 answer
453 views

After libc6 upgrade `sudo: account validation failure, is your account locked?` - What can I do before I switch off and repair from live CD

I have tried to install some packages (apache mariaDB) and something went wrong from my sudo apt install apache2 mariadb-server apt-transport-https At the end there was an error Checking init scripts.....
user avatar
  • 237

1
2 3 4 5
46