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

learn more… | top users | synonyms

0
votes
0answers
8 views

Sudo makemap permission denied [duplicate]

I'm trying to use the makemap hash command, but even as root it says Permission denied. Command i'm trying to run: sudo makemap hash /etc/mail/authinfo/gmail-auth < /etc/mail/authinfo/gmail-auth -...
6
votes
2answers
360 views

Parse error in sudoers file

I've created a user called kafka to whom I am trying to give a sudo access to run only /etc/init.d/kafka commands. I added the following entry to /etc/sudoers.d/kafka via Ansible: kafka ALL = ...
1
vote
0answers
26 views

File in sudoers.d/ directory became corrupt, cannot delete it? pkexec not working (Azure VM)

So I've got an Azure VM where I wanted to copy a file into an /etc/sudoers.d/ folder. Obviously I've tested the file before copying it, however something weird must have happened when transferring it ...
0
votes
0answers
19 views

Ubuntu 16.04 Node/ NVM - cannot sudo gulp (where is the .profile for sudo)?

I have installed NVM on an ubuntu server so that it is easy to change node versions. The install is working fine, and I insert nvm use 5.12.0 in the users .profile so the default nvm is in play. I ...
2
votes
1answer
36 views

SUDO Keeps promting for password, when using SSSD with AD

Hi I am trying to setup SSSD to authenticate to AD on RHEL. I able able to login with my AD user and password and see my groups when I run id. But when I try to use sudo, it just keeps prompting for ...
2
votes
1answer
95 views

ipa users cannot sudo on some machines only, including the ipa server

I'm having trouble with freeipa on a few machines. It's been very frustrating to debug so far. Here's the details of the issue; How it manifests: The user can login just fine to any host, but on ...
0
votes
0answers
17 views

Can I manage sudoers from Open Directory?

I have configured Open Directory & integrated it with Microsoft Active Directory so that the users sync with Open Directory. Now I want to manage sudo commands from Open Directory. Is this ...
0
votes
1answer
41 views

Error mounting ebs in amazon ec2

I have accidently changed permissions for my /etc/sudoers and /etc folders and thereby I am unable to access anything through sudo. After that I detached my ebs volume from the instance and attached ...
1
vote
1answer
39 views

Confusing e-mail related to sudo

My system occasionally sends me this email. (My domain has been replaced with [DOMAIN] and my username has been replaced with [USERNAME].) Subject: *** SECURITY information for [DOMAIN] *** [DOMAIN]...
2
votes
0answers
35 views

ssh -t -t sudo displays back my password

My problem is about executing sudo over SSH. I have tried various things, but non works. Here is my script: ssh my-host /bin/bash << EOF # some commands... sudo -u my-user -s -- << EOFF ...
1
vote
3answers
69 views

/dev/sdc1: unable to read superblock

Linux Ubuntu 14.04 (azure server) I was trying to backup /dev/sda1 drive so I executed the sudo dd if=/dev/sda1 of=/dev/sdc1 command. While executing the command is available, the space was ...
1
vote
1answer
27 views

Is there a way to configure sudo to not need to lookup group names / or speed up sssd group name resolution?

I've got a large number of Linux hosts that are connected using sssd to a windows active directory domain for user/group lookup. That mostly works fine except for one problem; sudo From what I'...
0
votes
2answers
56 views

Is there a way in Linux where one non root user can check if another non root user is using OpenSSL or not without sudo permission?

Consider this scenario where User-A and User-B are both non-root user are running inside a server. User-A is running different Program P1 (pid-2814),P2(pid-2815) whereas User-B is running different ...
0
votes
1answer
78 views

CentOS 7 Virsh - Allow Non Sudo Users to Interface with QEMU / KVM / Virtual Machines

Is there a way to allow non sudo users access to KVM QEMU virtual machines in CentOS 7? I want to allow a non-root user to manage KVM guest virtual machines without having sudo access. Mainly, I'd ...
2
votes
1answer
86 views

Ansible-galaxy not working with sudo

I'm having problems instaling plugins with ansible-galaxy. I've tried 3 things: Instaling without sudo: ansible-galaxy install sfromm.epel [WARNING]: - sfromm.epel was NOT installed successfully: ...
0
votes
1answer
25 views

How can I ensure auditability and least privilege based on AWS users inside an EC2 image?

I'm interning at a company which runs in an AWS environment and is starting to look into locking down user privileges, so I'm looking into ways to secure EC2 instances. Specifically, I want to find a ...
0
votes
0answers
19 views

Composer works as Common User but not root

When I run 'composer' as a common user, composer runs just fine. However if I run 'sudo composer' I receive a command not found message. When I enter 'sudo /usr/local/bin/composer' it works just fine. ...
3
votes
2answers
131 views

Allowing PHP to run specific bash script with root permissions

I have a php script calling a bash script like this: <?php $result = exec('sudo /bin/bash /var/www/my_bash_script.sh /var/www/vhosts/testsite/htdocs/'); var_dump($result); ?> This is ...
0
votes
1answer
49 views

How to register user on ejabberd using php code?

I am trying to register user on ejabberd linux server. I am using below php code <?php $username = 'hello'; $password = 'hello'; $node = 'my ip'; exec('sudo -S ejabberd /usr/sbin/...
1
vote
1answer
138 views

Sensu executing script sudo a password is required

I have a sensu handler that gets triggered on an endpoint Linux box (Centos 6.6. Here is the script I'm using: #!/bin/bash --login sudo -n -u deploy bash --login -c "cd /var/www/vhosts/sc/current; ...
1
vote
1answer
25 views

Centos 6 - Allow sudo composer self-update for user without password

I'm trying to allow my wheel group user to run sudo composer self-update without a prompt for a password for my deploy script. I have added the bottom line below to my /etc/sudoers file: ## Allows ...
2
votes
1answer
52 views

bash: /etc/hosts: Permission denied [duplicate]

Why when I run I get the error: $ sudo echo "127.0.0.1 db-local.internal" >> /etc/hosts bash: /etc/hosts: Permission denied But when I do sudo su I can edit this file without any problem.
-1
votes
1answer
68 views

Setting up SSH with the correct user rights [closed]

I want to setup my SSH connection correctly. As many tutorials told me, it is not recommended to use the root account of Ubuntu server. So I would rather use my standard account "Simon" to upload ...
0
votes
2answers
39 views

Sudo command refused (htpasswd) - CentOS / Apache (htaccess)

I want to give one of the web developers testuser permission to set his own .htpasswd password using the /usr/bin/htpasswd command on the web server 'mywebserver'. The web server tree belongs to the ...
1
vote
1answer
33 views

Running npm via sudo (not as root, not as self-user) can't find npm where root or self-user can

I have a makefile, which I use to sudo make install for the parts of my app that generally require root installation. Unfortunately, this results in a strange situation where sudo doesn't have access ...
0
votes
0answers
71 views

remote execution of commands using sudo /usr/bin/ssh

I have the following sudoers file in /etc/sudoers.d: Cmnd_Alias GETCONFIGFILES = /usr/bin/ssh servername.mydomain.com -p 1022 'cat /path/textfile.txt' User_Alias TOMCATUSER1 = localuser TOMCATUSER1 ...
0
votes
1answer
44 views

Restricting su command in a specific manner

I have a list of system users who have access to almost everything via sudo. Now I would like to restrict their sudo access for command su. I would like to restrict su command for every user on ...
0
votes
2answers
68 views

Access /proc/$pid/exe as regular user

I am in the process of developing a custom Nagios plugin to monitor the absolute path of a few running processes. As a root user I have always used the command 'ls -l /proc/$pid/exe to find the path ...
1
vote
0answers
13 views

sudo as another user that contains current user string in username

Let's say there are 100 users in the system: msmith bdole agrant . . . Is there a way to write a generic sudoers rule to allow each of these users to execute commands as another user, where the ...
0
votes
0answers
20 views

Run a script if another process was spotted

I have CentOS 7 and looking for a sollution about a small issue. I want to have a sudo script to be run but only if the system executed a specific command remotely. For example: I've put my command ...
2
votes
1answer
102 views

use Sudo in apache

I am using CentOS 6 and trying to call sudo in Apache using this command: exec("sudo -u kouser whoami 2>&1",$output,$code); However SElinux add a line to output array(2) { [0]=> ...
0
votes
2answers
80 views

Using GREP to Find Text in Files

I'm trying to use grep to find a specific line of PHP code I know for certain is present in several files, but all I get back is an empty result. Please advise on how I need to modify my grep query: ...
1
vote
2answers
53 views

Recursive Sudo Privileges

I am in the process of setting up specialized sudo for our first line support team. I would like to authorized them to delete anything within /var/log/. The command below however only applies to files ...
0
votes
1answer
49 views

SUDO command only works as root (Solaris 10)

After installing sudo in the system i am unable tu run sudo as a non-root user, when i try to execute any command i get: /usr/local/bin/sudo: cannot execute if i edit /etc/passwd to use a different ...
1
vote
1answer
173 views

Difference between sudo /bin/bash and sudo su to access root

I am aware that there are at least 2 ways to escalate to root privileges when in the terminal, and am genuinely curious as to whether there is a differences / are differences as to what can be ...
2
votes
2answers
96 views

Linux: Allow user to execute specific command on behalf of any other user

I am trying to find a way to allow user john to execute a command (say echo) on behalf of another user peter without being prompted for password. I found a thread that I thought would be the answer ...
1
vote
2answers
32 views

Prevent root in linux from changing folder permissions in GPFS filessystem

I have created a NFS export in a GPFS/SpectrumScale filesystem I created. I have enabled AD based authentication with our domain. Everything works. The NFS export was created with NFS4. The NFS ...
1
vote
1answer
31 views

Unable to mount NFS export unless I sudo to root

I created an NFS export on a GPFS/SpectrumScale filesystem I set up. I tested the NFS export on a xLinux, pLinux, z/OS and AIX succesfully. I then enabled AD based authentication on the NFS export ...
0
votes
0answers
76 views

How to autostart node forever and spawn() as sudo?

My app periodically spawns a CasperJS scraper: spawn(CASPER_PATH, [SCRIPTS_PATH + fileName, '--ssl-protocol=any', '--user='+user, '--scrapeId='+scrapeId, '--pass='+pass], { detached:...
1
vote
0answers
23 views

How to run root commands form a website? [closed]

Im working on a project, in it I intend to make a website with server administartion functionalities. So far, I'm able to run all guest commands like ping,nmap,etc. But, I want to run root commands as ...
2
votes
1answer
37 views

Create a Web User

I am running Apache 2.4.8 on Arch Linux, but that doesn't matter really. I would like to create a user who is devoted to web management. I have created a user, a group, and added the user to the ...
-2
votes
1answer
47 views

Is it possible to “sudo su” using ssh in bash? [duplicate]

#!/bin/bash USERNAME=ksmith HOSTS="linux1" YUPDATE="sudo yum -y update" FIXDATE="sudo -u echo -e 'ZONE="America/New_York"\nUTC=true' > /etc/sysconfig/clock" for HOSTNAME in ${HOSTS} ; do ssh -tt -...
0
votes
0answers
152 views

sudo NFS SUID not working

Today I decided to move my NFS files from an ext4 HDD to an ext2 HDD using mc. Since then I am having trouble running the sudo command on all clients. When I try to run it I get an error saying "...
0
votes
1answer
280 views

sudo and Kerberos on AWS Linux issues

We have an issue on some of our AWS machines, running Amazon's hacked Fedora/RHEL linux where newer-in-AD users can login with password but cannot autheticate for sudo. Users that were created in AD ...
0
votes
1answer
2k views

sudo mv fails with “Operation not permitted”

When I command on my MacOS: > sudo mv /usr/bin/php /usr/bin/php-52 I get the result: mv: rename /usr/bin/php to /usr/bin/php-52: Operation not permitted What can I do? Thanks!
5
votes
1answer
120 views

Limit number of concurrent users switching to root account?

This is for Ubuntu 14.04 and Centos 7. I need to limit the number of users actively running as root. i.e. Logged in as root on the CLI. Basically, I want only one user at a time to be able to run ...
0
votes
0answers
71 views

cann't we have 32 bit uuid package installed along with 64 bit uuid package in ubuntu 12.04 64 bit

i am using 64 bit Ubuntu 12.04. i am trying to build 32 bit project in 64 bit Ubuntu OS. UUID generator related functions in a library. it is giving below linker error related to luuid: /usr/bin/...
-3
votes
3answers
80 views

I want a user to run bash scripts with sudo [closed]

So this is for a school assignment. I have a working Bind9 and Apache2 server. I've written 3 scripts that make appropriate changes to the configuration files DNS add zone DNS add record HTTP add ...
1
vote
0answers
37 views

Using Ubuntu Server 14.04 as a webdeveloper [closed]

I have a Ubuntu Server 14.04 installed in my network used solely for development of websites (PHP, Laravel). Websites are located in their own directories under /var/www/domain.ext and can be accessed ...
0
votes
1answer
521 views

Ansible become_user not picking up path correctly

Here's the code showing what I believe is a problem: # Debugging path problems with sudo --- - hosts: webservers remote_user: root tasks: - name: echo path command: echo $PATH register: ...