Questions tagged [sudo]

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

sudo allows users to run commands as another user. It is typically used to allow trusted users to run commands as root, without giving them root access, or to allow a user to run commands as another user. Both of these uses must be allowed by the root user.

886 questions
-1
votes
1 answer

Why do some commands require su instead of just sudo to do?

I thought that running a command with sudo was identical to logging in as the root user and executing the command. However I have found a few commands that do not work with sudo but do work for su. For instance, sudo > mail.log bash: mail.log:…
Startec
  • 107
  • 3
-1
votes
1 answer

visudo + how to enable user to delete any file under /var/log/http

I want to enable user - "Ertop" to delete any file or directory under /var/log/http by update the visudo I have redhat machine version 6.x user name is Ertop I set the following in visudo but not sure it this syntax is ok Ertop ALL=(root) NOPASSWD:…
King David
  • 549
  • 6
  • 20
-1
votes
1 answer

Use SSH to copy remote files to local NAS drive

I'm looking to create a script that logs into a machine and pulls back files to a NAS server. The files will be put into a compressed file as it downloads. Because the script will be looking to download files with varying owners and permissions, it…
jamboNum5
  • 361
  • 1
  • 2
  • 10
-1
votes
2 answers

effective uid is not 0, is sudo installed setuid root?

I am using a cloud server of godaddy & I don't have root password. My master user has root access through sudo. I was trying to create another user and set permission for a specific directory. I've created a news user testuser & created a new…
-1
votes
1 answer

Setting up SSH with the correct user rights

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 files and transfer terminal commands. When I run…
user346912
  • 33
  • 2
-1
votes
2 answers

debugging sudo -i -u www-data -g www-data env

When I run sudo -i -u www-data -g www-data env I get sudo: unable to change directory to /var/www: No such file or directory This must be coming from script somewhere, but I don't know where. How would I find this out and fix it? Is there a standard…
Cenoc
  • 217
  • 1
  • 12
-1
votes
0 answers

Give Non Root group of Users access to start mysqld service

I have a Non Root User abc,abc2..... I want to add this to a group of users and want to give the group of user ssudo rights only to restart, start or stop - mysqld service. i.e sudo service mysqld restart. How can I do it so?
Shahrukh Khan
  • 201
  • 2
  • 5
  • 10
-1
votes
1 answer

Why syntax error with visudo ¿?

What's wrong with this line of sudoers file? %test ALL=(ALL)NOPASSWD:/usr/bin/supervisorctl status test, /usr/bin/supervisorctl start test, /usr/bin/supervisorctl stop test, /usr/bin/supervisorctl restart test, /usr/bin/supervisorctl status…
lostcitizen
  • 131
  • 2
-1
votes
1 answer

How to deny a specific user to reboot or shut down with sudo

Hello and thanks for helping me in this question. I just have in /ets/sudoers something like this: # User Aliases User_Alias CLIENT = jhonny CLIENT myserver = ALL. !ADMIN_CMD,!SU I just want deny to jhonny the capacity to shut down or reboot the…
erucv
  • 1
-1
votes
2 answers

Security in users having sudo access

How to protect my passwords list (in different databases for example) in a UNIX environment where most of the users have sudo access to other user IDs? I have a script (main.sh) with the following content in my $HOME: $ cat main.sh mysql…
-1
votes
2 answers

How to set "sudoers" in nsswitch.conf on Solaris-11

I am doing this on Solaris 11. When i open '/etc/nsswitch.conf' i see this - ... sudoers: files ... I would like to change this to - ... sudoers: files ldap ... I tried editing the file directly, but when i reboot host, changes are lost. I…
Quest Monger
  • 189
  • 2
  • 4
  • 12
-1
votes
2 answers

Sudo access on Ubuntu

I'm new to linux and the sysadmin world all together, so I'm looking for some advice and a couple of answers. I set up an EC2 instance running Ubuntu 12.04 and I SSH in via key pair. First of all, I read through the Ubuntu user management page but…
-1
votes
1 answer

sudo su - should be possible but sudo su - shouldn't be for sudo user

There is a requirement I got. My sudo users (for which their entry in sudoers file) should be able to access other user's account say Oracle using following command: sudo su - Oracle The above should work with giving current users password. But if…
Winnie
  • 1
  • 1
  • 1
-1
votes
1 answer

sudo to other user doesn't preserve DISPLAY variable

I've got an /etc/sudoers file that works just fine in all versions of Fedora prior to F18, but we've noticed that when upgrading to F18 (and installing FreeIPA, though the cases I'll show here were run with sudo processing done using this file to…
wortmanb
  • 183
  • 3
  • 9