The tag has no usage guidance.

learn more… | top users | synonyms

2
votes
2answers
30 views

sudoedit but no cp

I have access to a file /etc/apache/myfile.conf that gets included in httpd.conf. The permissions are: -rw------- 1 root root I have sudoedit permission to the file but not read! I can open the ...
1
vote
3answers
43 views

how to make a large command line broke in two lines be executed as a single line inside of a script

I am very begginer with Unix. I am using IBM z/OS390 and I am using the OMVS shell. I don't have "vi" installed at all so I use "oedit". If I try to initialize the app.jar straigh from OMVS shell it ...
0
votes
1answer
37 views

How to forbid ssh connection after sudo -u

After ssh login, user with UserName makes $ sudo -u localusername -i and $ ssh localusername@someserver How to forbid ssh localusername@someserver for UserName via sudo -u localusername but permit it ...
0
votes
1answer
30 views

Now visudo won't work at all

RHEL 5.10 When I do visudo I get this error: chuck 75->visudo visudo: /etc/sudoers: Permission denied visudo: /etc/sudoers: Permission denied Listing of sudo exe file and /etc/sudoers: chuck ...
1
vote
0answers
28 views

Why does visudo compare the contents of `VISUAL` to a fixed whitelist? [duplicate]

This is on Ubuntu 15.10 I'm trying to get a better understanding of visudo and how it works. The documentation explains that visudo will consult the VISUAL environment variable and compare it against ...
1
vote
1answer
45 views

Getting password prompt after editing sudoers file in cent OS 7?

Part of my sudoers file lines begingin with mukesh are edited: ## Allow root to run any commands anywhere root ALL=(ALL) ALL mukesh ALL=(ALL) SOFTWARE,DRIVERS mukesh ALL=(root) ...
1
vote
2answers
323 views

Enable user to execute one command as another user

The goal is to let the www-data user execute sudo -u postgres -H osm2pgsql [some options here] without being asked for a password (as this will be part of a script wich runs automatically). I thought ...
1
vote
2answers
190 views

How do I fix my /etc/sudoers file to recognise me?

Currently, I am receiving the following terminal error: sudo: parse error in /etc/sudoers near line 10 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin I have ...
0
votes
1answer
162 views

Sudo Apache, with command line ? (not visudo)

I have visudo-edited /etc/sudoers this way: User_Alias APACHE = www-data Cmnd_Alias FIREWALL = /sbin/iptables, /sbin/ifconfig, /sbin/route APACHE ALL = (ALL) NOPASSWD: FIREWALL (To allow php ...
2
votes
1answer
4k views

pam_unix(sudo:auth): auth could not identify password for [asteriskpbx]

to install the asterisk program, I created a sudo user and added to /etc/sudoers file like this: asteriskpbx ALL=(ALL) NOPASSWD: ALL but, when I try to start the service, I get the following ...
6
votes
1answer
152 views

How can I make `sudo crontab -e` use my `sudoedit` environment?

I've started using sudoedit <file> instead of sudo vim <file>. One of the advantages is that it uses my local ~/.vimrc. However, when using sudo crontab -e, it uses /root/.vimrc instead. ...
1
vote
1answer
181 views

Using sudoedit in a script (non-interactively)

I'm looking to modify a file from a script. I can sudoedit the file as the bob user by doing sudoedit -u bob /foo/bar.conf but don't have rights to do anything else as bob. I came across http://...
6
votes
3answers
206 views

What bad things could happen if we don't use sudoedit?

We know it's safer* to use sudoedit, but what bad things can happen if we have the following in sudoers? Cmnd_Alias FOO = /bin/ed, /usr/bin/ed, /usr/bin/vi foouser LOCALHOST = NOPASSWD: NOEXEC: FOO ...
1
vote
2answers
156 views

Is there a sudoedit equivalent for vimdiff?

I'm trying to get into the habit of editing root-owned files with sudoedit, instead of sudo vim. This has a few advantages, one of which is that it uses my user's ~/.vimrc. Is there an equivalent, ...
1
vote
1answer
2k views

How to give Root privileges for User in Centos 6.2 minimal

I installed Centos 6.2 minimal x86_64 server in Virtual Machine Manager. After installed I created Username in the server. And I added the User into a wheel group. # useradd testuser # ...
3
votes
2answers
1k views

Sudo email notification setup error

I'm Using Centos version: [sysadmin@backup-srv ~]$ cat /etc/redhat-release CentOS release 6.4 (Final) I'm using this sudo version: [sysadmin@backup-srv ~]$ sudo -V Sudo version 1.8.6p3 Sudoers ...
2
votes
2answers
195 views

visudo/sudoedit and gvim --remote-silent

Is it possible to use gvim --remote-silent and similar as an editor for visudo and sudoedit? Actually, I don't think this is related to the --remote option. Even if I set Defaults editor = "/usr/bin/...
1
vote
1answer
3k views

sudoers - How to use NOPASSWD and sudoedit at the same time?

What is the syntax for using NOPASSWD and sudoedit at the same time in /etc/sudoers? I tried this: john ALL=(ALL) NOPASSWD: sudoedit /path/to/file but I still get prompted for a password.
4
votes
2answers
982 views

Sudoedit Vim force write (update) without quit

I'm doing some scripting with Vim and I've just started using sudoedit. Problem is, when I :w it writes to the temp file, so any testing of the script can't happen unless I quit the editor. How can ...
2
votes
1answer
86 views

How can I run emacs with no shell?

I'm administrating an Arch Linux server. How can I securely add emacs to my /etc/sudoers editor variable? Currently I have "emacs" but that allows M-x shell. Basically, I want something like rvim, ...
12
votes
3answers
2k views

This file must be edited with the 'visudo' command.? [duplicate]

Why it is recommended to edit /etc/sudoers file with the visudo command? Here is a sample of the file: ## Sudoers allows particular users to run various commands as ## the root user, without needing ...
0
votes
4answers
159 views

Trying to setup sudo user

I'm trying to setup sudo with no password but still I get prompted for password. I'm using Ubuntu, here is the relevant line from the sudoers configuration file : gandalf ALL=(ALL:ALL) NOPASSWD: ...
2
votes
0answers
329 views

Is there a better alternative to sudoedit?

What I really hate about sudoedit is the fact that it always uses a different filename. I'm using emacsclient and when editing a file twice I'm left with two useless buffers. Sometimes I even happen ...