Questions tagged [sudo]

sudo is a tool which allows users to run commands as another user (usually the root user)

Filter by
Sorted by
Tagged with
-1
votes
0answers
31 views

Mount error (13) : Permission Denied windows share [closed]

Hello I need help on windows share with ubuntu server. I am getting the "mount error(13):permission" denied. First part is what I input, per instructions from my assignment. The bottom part ...
1
vote
1answer
31 views

how to create a script shell command

Hi evry one can someone help me to get this command with scrit shell ? root@VPS:/work# cpan Loading internal logger. Log::Log4perl recommended for better logging CPAN.pm requires configuration, but ...
-1
votes
1answer
36 views

Allow user to execute sudo commands without inserting password

I have a Debian-based system (most likely an Ubuntu 18.04 LTS) with a user, say user, that executes an application (as a daemon). The system is not exposed to the Internet with a public IP address. ...
0
votes
0answers
9 views

Runuser Not Return Expected Results

There are two accounts in my linux computer, appuser and root. For testing purpose I wroto below code into /home/appuser/.profile export key=value then as root I execute below commands separately: 1....
0
votes
1answer
43 views

Allow a user to restart a service

I am trying to restart a service without being root. Here is the code snippet where the command being used template { source = "{{vault_template_dir}}/agent.crt.tpl" destination = &...
1
vote
0answers
27 views

gcp container-os with OS login and IAM admin asking for sudo password?

I'm running cos VERSION_ID=85 BUILD_ID=13310.1209.17 and I love the web ssh console. It was bugging me to enable OS Login to speed up authentication so I finally did it. the user i'm logging in with ...
0
votes
2answers
19 views

Running newusers util in cron to batch create users does not run [duplicate]

I'm attempting to batch create some users from a file using the newusers util on ubuntu 18. When running in cron as the root user, nothing happens. When I run the command manually, it works as ...
2
votes
0answers
41 views

what is the risk of allowing the sudo option closefrom_override?

I have an awk script that uses stdout to write to a file and /dev/fd/3 to write a status message about what happened during the run. When I invoke awk with sudo, it fails because sudo closes all the ...
0
votes
1answer
27 views

Grant a user sudo powers to start/stop/etc a systemd service w/o sudo password

I have one non-root user, and I would like to give them sudo permission to start & stop (etc.) a systemd service file without needing a password. I tried to just make the following file in /etc/...
0
votes
2answers
29 views

Want to allow application to mount a drive using rhel 8

I can mount my drive using sudo mount.cifs ...... I can unmount doing sudo umount /mnt/mountpoint It was prompting me for a password, so I changed the sudoers file to NOPASSWD:ALL and now it does not ...
0
votes
2answers
44 views

Restrict a user to only interact with a systemd service via Ansible

I want to have a user that is only able to start/stop/restart/status a service via an Ansible playbook. The playbook looks like this: host: my-server remote_user: my-user tasks: - name: "Start ...
0
votes
0answers
17 views

Limit docker rights

I am planning to give users access to docker. But I want to limit their rights, by limiting by example no priviledged no mount of /dev no mount of folder if they don't have the rights (is this list ...
0
votes
1answer
91 views

How to allow PHP exec to reload NGINX

How can I allow these commands in PHP: $output = exec('sudo nginx -t 2>&1'); $output2 = exec('sudo /usr/sbin/service nginx reload 2>&1'); I've looked into sudo visudo in the terminal , ...
0
votes
1answer
61 views

logrotate postrotate seems not being executed

I have this configuration on Ubuntu 20.04: /home/impulse/nginx/log/*/notice.log /home/impulse/nginx/log/*/access.status_ok.log /home/impulse/nginx/log/*/access.status_erro.log { daily nomail ...
0
votes
0answers
34 views

Google LAMP trying to update sudo

I was trying to update sudo on my LAMP cloud server at Google, but to no avail it seems. Doing sudo apt update, then sudo apt install --only-upgrade sudo if finds the same sudo as on the system: Get:1 ...
1
vote
1answer
2k views

How to protect against sudo vulnerability CVE-2021-3156

I tried to patch the new sudo vulnerability as described in https://access.redhat.com/security/vulnerabilities/RHSB-2021-002 I'm getting the following error. # stap -g sudoedit-block.stap Checking &...
0
votes
1answer
240 views

zabbix : prob… with defaults entries ; TTY=unknown ; PWD=/ ; USER=root ;

Zabbix sends me those annoying emails with body: zabbix : problem with defaults entries ; TTY=unknown ; PWD=/ ; USER=root ; Now I do not have sssd installed, nor do I have sss word in /etc/nsswitch....
1
vote
0answers
29 views

Cannot perform command as a different User - even from root user

I have pm2 node modules installed in a user called otheruser. I need to run the program from root user. If I normally logged to otheruser and perform any action its working fine. otheruser@bubble-...
1
vote
1answer
46 views

How to run wall command as another user in Linux (RHEL8)

How do I send a wall message as root (or any other user) and it not identify the original user? Looking at the below I would have expected wall to display message from root but it still shows admin1, ...
1
vote
1answer
1k views

Ansible “missing sudo password” even with passwordless sudo enabled

I have in my sudoers file ALL ALL = (ALL) NOPASSWD: ALL Which allows anyone to use sudo without entering a password. And I confirmed that I can sudo without a password when I ssh into the ...
0
votes
0answers
68 views

Can I limit sudo password attempts as part of command?

I have been digging for the answer to this and I can't seem to find it. I believe I have uncovered a way to set the number of times sudo will ask for a password in the config file but this is not what ...
0
votes
1answer
290 views

CentOS 8.2 LDAP client configuration

I'm trying to configure an LDAP client on a CentOS 8.2 machine, using SSSD. The server doesn't use TLS or SSL. I have modified the following configuration files : /etc/sssd/sssd.conf [sssd] ...
0
votes
1answer
34 views

chaining ssh update commands in a script fails

I want to run a single script locally that invokes a 'sudo ./up' on several remote hosts via ssh. Where ./up is simply: ---- /home/user/up ---- #!/bin/bash sudo apt update && sudo apt -y ...
0
votes
1answer
88 views

Self-Hosted Github runner, how do privileged commands work?

What I'm trying to achieve: A fully automated deployment for a React App, on any commit to the live branch, by my own defined Github Runner, which is running Ubuntu Server 20.04, with npm 6.14.8 What ...
0
votes
3answers
68 views

rsync but keep destination ownership without setting to source ownership

I've got some files which I would like to sync to a linux server. Only problem is it resets the ownership and group to the current user and group. Unfortunately the options --owner, --group, and --...
1
vote
1answer
276 views

Is there any way to force sudo to not log actions from a specific user?

All of the servers in my network are running a Zabbix agent for monitoring, and some of the additional items I've added to them require the use of sudo to execute. Normally this isn't that bad, but ...
0
votes
1answer
89 views

How can I disable users in “domain admins” group from running sudo?

Hi we have a large company and have some Domain Admins who belong to the id myadminuser groups=101010(domain admins), "domain admins" group. I was surprised by default that the sudoers %...
0
votes
1answer
69 views

Audit ALL Sudo users and show the users UID( ) not root's UID (0)

I'm trying to log ALL users activities using su/sudo's but the logs show UID (0) root, I want to see the actual UID of the user and not Root. I've tried the Auditctl service and I've search for PAM ...
1
vote
0answers
76 views

Sudo needed a second time when rsync files with ssh key

I use a command to transfer files with rsync and a ssh key: sudo rsync -P -e 'ssh -i <absolute path to keyfile>' <file> user@<server> I need the first sudo because the file I'm ...
1
vote
1answer
1k views

awscli v2 needs sudo to run otherwise get permission denied error ubuntu 20.04.01

I've installed the awscli V2 as per the official AWS instructions here: $ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" $ unzip awscliv2.zip $ ...
1
vote
0answers
34 views

Difference between 'sudo gem install something' and 'gem install something'

In this case I'm using gem as an example, but I think it can be extended to any other program. I use a Mac and I installed rails using command gem install rails from directory /Users/myusername/...
0
votes
2answers
62 views

Does sudo access necessarily compromise network security? (naive newbie)

I work in software development for a large corp with fairly strict IT. I am ignorant of security practices. Developers on Windows machines have local administrator rights, are able to install apps etc,...
0
votes
1answer
37 views

su - with automatic change directory once su command is done in shell scripting

im not familiar in shell scripting but im trying to achieve at least this script but my problem is once superuser rt is done logging in it brings me to this [rt@superuser root]$ instead of reading ...
0
votes
1answer
423 views

Bash: Checking if can sudo on remote host using sshpass; how 'exposed' is the password?

I am using bash script below to test whether sudo is available on a remote host. I'm obtaining the password from user input. I understand (to a limited extent) that using passwords inside a script ...
0
votes
1answer
42 views

How can I permit a user to run some commands with passwordless sudo - without breaking all other commands?

I am on a CIS-hardened RHEL 8 host on an AWS EC2 instance. My goal is to permit my user to run some commands with sudo passwordless (e.g. ls, cat, ...), while other commands (like vi) should stay ...
0
votes
1answer
119 views

Compute OS Admin Login role doesn't make user sudoer

I have a user with the Compute OS Admin Login role, but when I log in using ssh, this user is not a sudoer. I've tried to restart the instance, but still the same. I've tried with enable_oslogin:TRUE ...
1
vote
1answer
407 views

sudo error “Either need terminal or -S option”

Running as SYSTEM [EnvInject] - Loading node environment variables. Building in workspace /var/lib/jenkins/workspace/myapp_FrontUAT using credential 27a4cc0a-d18c-4a8f-bfcd-788d481e12ed > /usr/bin/...
0
votes
1answer
79 views

`sudo` equivalent of `sshpass`? `sudopass`?

The sshpass programme can automatically enter the ssh password without you having Is there anything that will do that for a sudo prompt? Like sudopass? e.g. sudopass -p SUDOPASSWORD sudo -i Ubuntu ...
0
votes
1answer
426 views

sudo twice become method for Ansible

I have to deal with a setup in "/etc/sudoers" that I can't change because the servers in question are managed by a different team and they don't want to change it. I have root access only by ...
0
votes
1answer
1k views

Automate SSH login WITH password [closed]

Before this question gets deleted, I already read this, this, this, and this; and most of these links don't answer my question; because: I do need a key AND password I run multiple servers (50+), and ...
1
vote
0answers
24 views

Problems with accessing external content as sudo/root

System environment: VM running under Debian 9, firewall is iptables. UFW, etc not installed. I run into problems when spinning up a kubernetes cluster by executing sudo kubeadm init. The call causes a ...
0
votes
1answer
84 views

Superuser unable to change password of user on LDAP server

Just set up an LDAP server (sun) running Ubuntu 20.04 following the guide on Ubuntu Server Docs with TLS enabled with a bunch of users, groups, and automounts in database. Several clients (here: seca) ...
-2
votes
1answer
61 views

What's the magic path for npm when using sudo?

I remember I was able to use something like sudo ${which npm} run xxx when I needed root privilege to run npm. What is it?
0
votes
0answers
16 views

How can I rename sudo user in Mac OSX

In mac I've changed the username via preferences from oldname -> newname However sudo su username remains the same it hasn't changed. How can I change that?
2
votes
1answer
92 views

How to permit the chown use to a regular user, but only on its home directory?

I'm trying to allow regular user A to execute chown command to a list of user B,C,D having as object any files located into its home directory. In other words, I would try to limit the chown "root ...
-2
votes
2answers
47 views

How to protect from coworkers [closed]

Hello how to protect linux account form other administrators(coworkers) in company who can use your account to steal data and point a police that you are the guy who steal data from company. if ...
1
vote
1answer
65 views

When root opens crontab Vim is used although Nano is set as the default editor. Why might this be?

Environment: CentOS 8 Question: When I enter sudo crontab -e it opens in Vim. However Nano is set as the default editor and for every other type of file it is used as expected. Why might this be? ...
0
votes
1answer
102 views

Sudoers and setfacl command with arguments (:, " chars)

in a case of a deployment script (https://github.com/EasyCorp/easy-deploy-bundle/blob/master/doc/default-deployer.md#security-options) I need to run setfacl from a distant machine that push code. To ...
1
vote
0answers
2k views

PAM: password authentication failed for remote user

I am executing a command from server1 which would do a remote ssh to server2 and execute certain commands as olcne user. I am seeing some exception in /var/log/secure file wrt to pam. Can someone ...
0
votes
1answer
33 views

Control a systemd service through a web application built in python3

I have created a web app in python3 which is hosted on a apache2 web server using the wsgi module. Now one of the requirements of the web application is that it needs to restart a systemd service ...

1
2 3 4 5
17