1
vote
3answers
28 views

Add a sudoer non-interactively from command line

(On Centos through Docker) I know that I can add a sudoer using visudo. Is there a way to add a user to the sudoer list straight from the command line, so I don't have to do it interactively? I'm ...
0
votes
1answer
44 views

How can I install my script into the user's $HOME/.bin (or $HOME/bin) directory and make sure that is in their PATH?

Edit: places where I said $HOME/.bin I should have written $HOME/bin or any equivalent is fine. So I have a bash script which I am distributing as a client for my API. Current version installs like ...
-1
votes
2answers
66 views

Using SUDO to execute a general command inside a non-accessible directory

I want to grep something inside a directory. But the user dont have permissions in the direcotry. Because of some reasons, i am not allowed to change permissions, group or owner. Just want to know i ...
1
vote
1answer
595 views

Broken sudo on amazon web services ec2 linux centOS

So I had no idea of the dangers of messing with the /etc/sudoers file, and was just trying to make a simple change in there. However, I seem to have put something with incorrect syntax in there, ...
4
votes
3answers
3k views

Why can't I sudo some commands? (e.g., vim)

I have sudo access on my friends server, running centos-6.3, but when I try to run some commands like sudo vim /var/www/html/index.html I get an error sudo: vim: command not found I can, however, run ...
1
vote
4answers
2k views

“Wrapper” ssh script freezes when executing remote command

I am running OSX Mountain Lion and the remote server is CentOS 6. I have several scripts on my local machine that I want to run on the remote server and to that end, I thought to write one script that ...
1
vote
3answers
292 views

cannot access crontab with sudo after being added to /etc/sudoers list

My user "craig" is in the /etc/sudoers file on my CentOS 5.6 VM, however when I try to access the crontab using the command below I am presented with an error message: sudo crontab -e -u ...
1
vote
1answer
179 views

sudo configuration & log for contractor

Next week, I will have a contractor install a web application on one of our servers. I created an account so that they can access our server through SSH. The system is CentOS. Basically, beside basic ...
0
votes
1answer
2k views

How do I give a group 'service httpd graceful' permission in sudoers without passwd prompt?

I'm currently trying to lock down my users a bit. I've created some users: www.foo www.bar and a group: apacheadmins Both www.foo, and www.bar are members of the apacheadmins group. They do ...
1
vote
1answer
741 views

sudo access to view/edit a crontab

I wish to be able to edit, or at least view, a crontab that is on a server. Should I not be able to run this to do so: sudo crontab -u root When I do, I get this error: Sorry, user crmpicco is ...
0
votes
2answers
485 views

sudo in CentOS 6.1 does not preserve command aliases as sudo elsewhere does?

On a stock CentOS 6.1 installation, if I start in my user shell (tcsh) with all my usual command aliases and do what I normally do (in other versions of Linux, and Mac OS X) to get a root shell, ...
0
votes
1answer
156 views

How can I allow user A to run commands as user B if I don't have access to root?

CentOS 5.6 There are two users; user A and user B. I have permissions for both and can log in as either. I would like to be able to log in as user B, and somehow run commands as user A without ...
2
votes
5answers
1k views

why do I need the “sudo” in this particular command?

sudo yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel for installing required packages for Thrift on CentOS 5.. is it ...
1
vote
1answer
2k views

symlink and sudo executable

If I have the below sudoers entry usera ALL=(userb) NOPASSWD: /home/userc/bin/executable-file usera ALL=(userb) NOPASSWD: /home/userc/bin/link-to-another-executable-file When I log-on as usera and ...
9
votes
5answers
11k views

sudo access for desktop actions in Gnome/KDE?

I feel kinda silly asking this question. I'm using CentOS 5.4 and KDE. I downloaded an archive and I want to drag/drop the contents into a folder that I need root access to write to. I can obviously ...
2
votes
1answer
1k views

CentOS, sudo Doesn't Accept root Password, but Logging in as root Works

I am new to Linux and I have CentOS running on a dual boot system. I was trying to edit a file requiring root permissions, so I used sudo. I typed the root password and it failed. This happened ...