The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
1answer
26 views

How do I add to sudoers.d from a custom rpm

I have a custom RPM I created that needs to add entries to sudoers so I have entries added a file in my RPM /etc/sudoers.d/mypackage and put my sudo commands in there. The files gets added and the ...
0
votes
1answer
39 views

Mac OS X El Capitain can't sudo

Getting this error when trying to sudo on a mac I just received from work. sudo: can't open /private/etc/sudoers: Permission denied sudo: no valid sudoers sources found, quitting I tried disabling ...
0
votes
1answer
34 views

/etc/sudoers set user to have general sudo use, with no password prompt for only one commands

I have an entry in /etc/sudo for a user who can execute sudo for all commands. fred ALL=(ALL:ALL) ALL As per the documentation the final ALL is responsible for allowing access to all commands. ...
1
vote
2answers
53 views

What is the different between giving user root privileges and adding it to root's group

In Centos 7 I use visudo to grant root privileges, and I'm wondering what is the different between: myuser ALL=(ALL) ALL and # usermod -aG wheel myuser
2
votes
1answer
30 views

Why am I able to switch user only using hyphen?

If I try to switch the user using sudo su - kshitiz it works, and doesn't ask me for any password. But if I do sudo su kshitiz it asks me for that user's password. Why is this? I understand that ...
0
votes
1answer
22 views

Unable to get sudo lecture working on CentOS 7 server

I'm trying to enable the sudo lecture every time someone executes sudo, but I can't seem to get it working at all. I found a similar question here, in which someone states that if you don't see any ...
1
vote
0answers
29 views

Sudo user is not able to export path of ant

Sudo user is not able to export path of ant. I am trying to execute shell script setpath.sh which exports path for ant. After executing the script when I am executing ant command then getting ant ...
1
vote
2answers
142 views

Running script that has sudo commands with sudoers

I wrote a script that helps clean up my downloads and anime, but it won't run without root. So I tried adding it to /etc/sudoers (edited using techraf's suggestions): # This file MUST be edited ...
0
votes
0answers
26 views

rsync via sudo user using ssh not working

I logged in as USER1 and I am trying the below one from shell script. rsync -v -p -t -e "sudo -u USER2 ssh" USER2@HOST2:${REMOTE_FILE_TO_MOVE} \ ${DESTINATION_PATH} It prompts password for USER1 ...
0
votes
1answer
128 views

Corrupted sudoers file preventing me from using sudo

I attempted to add another user to the sudoers list on my Raspberry Pi running Debian (Raspbian Jessie kernel ver 4.1). While doing so I entered the entry in wrong and I keep getting these errors ...
0
votes
1answer
114 views

sudo to any user without a password

If sudo can be configured to no password such as: bob ALL=NOPASSWD: ALL Then how can you configure sudo to be able to sudo to any user without password ? So that sudo -u domainnameuser.com mkdir ...
0
votes
0answers
76 views

Bricked my Ubuntu server can no longer start nor login anymore

I installed a virtual host (KVM) with Ubuntu Server 14.04.3 LTS. Now I spend the last week setting up apache, modules owncloud and other stuff. However, everthing worked great until I followed the ...
1
vote
2answers
136 views

Disable startup program super user authentication

I want my VPN to run on startup after logging into my user account. Currently running Ubuntu 15.10. I have added the program to startup (/usr/bin/mullvad); however, it asks for authentication before ...
0
votes
0answers
95 views

Sudo: allow group of users to su to users defined in user alias

I need to setup sudo to allow any user from group webadm to su or su - to a number of users defined in particular User Alias. Each user from webadm group shoud be able to su only to defined users, ...
4
votes
1answer
79 views

Why are sudoers not defined by UID?

Login information is tied to UIDs in Linux. However, when I open the sudoers file the sudoers are defined by username instead of UID. Why are used usernames instead of UID? Does the sudoers file ...
1
vote
1answer
310 views

Restrict access to directory with sudo

If I have a folder at /var/secret/ and give a user access to the sudo command, is there a way to allow them to have full access to everywhere else, BUT /var/secret/ and give them absolutely no access ...
0
votes
1answer
52 views

Meaning of parameters in sudoers file in RedHat

HI can you tell me what is the meaning of each and every parameter meaning of this line of sudoers file in RedHat machine? steve CSNETS = (operator) /usr/local/op_commands/ I know first ...
1
vote
0answers
24 views

Root Privileges and Risky Commands

user ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf user ALL=(ALL) /usr/bin/less /etc/httpd/confs/httpd.conf I think if these scripts are written in sudoers, "user" can cause problems on the ...
1
vote
0answers
36 views

sudo --set-home decide based on command

I was wondering if there is a way to make sudo set the --set-home flag based on the command being executed. e.g. in most cases I do not want the --set-home flag to be set, but for npm, I want it to ...
0
votes
1answer
341 views

no valid sudoers sources found after running sudo chmod -R 777 /etc on AWS

As I said, I did a stupid thing on Amazon Web Services. sudo chmod -R 777 /etc` which gives this when using sudo: sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, ...
0
votes
1answer
50 views

sudo NOPASSWD for particular paths

How can I enable NOPASSWD for a user to do anything in several paths? For instance read/write/execute any file in /etc/init.d and /opt/?
1
vote
0answers
94 views

PYTHONPATH variable can't be echoed by non-root

I edited my sudoers file by getting root privilege as sudo -i Then I edited my sudoers file by nano /etc/sudoers I added Defaults env_keep += "PYTHONPATH" to the sudoers file. Then from root, I ...
2
votes
2answers
2k views

`sudo adduser username admin` leads to `adduser: The group `admin' does not exist.`

I'm trying to add a user to the sudoers file with the simple command sudo adduser username admin but I get adduser: The group 'admin' does not exist. So I checked out the sudoers file (sudo visudo ...
0
votes
1answer
26 views

Make a group be able to run shutdown command without entering a password (CentOS)

I used the command visudo -f /etc/sudoers to edit the sudoers file. How do I make a group be able to run the shutdown command without supplying password?
0
votes
1answer
106 views

Avoiding root password

I have done this modififcation: vim /etc/sudoers # User privilege specification root ALL=(ALL) NOPASSWD: ALL When i use: sudo service cassandra start it works without password. But, when i ...
1
vote
1answer
327 views

My admin user has completely lost the use of sudo (only gets 'permission denied')

OS X 10.8.5 I first realized the problem trying to delete software from a Japanese wireless carrier when I installed their client while I was there. Then I realized I actually can run no command ...
0
votes
1answer
199 views

Can't sudo because password is disabled

So, in my attempt to prevent the default ubuntu user from logging in, and to prevent the default sudo user me from logging in with a password, and thus enforcing to use the private key, I managed to ...
0
votes
2answers
126 views

How to allow a user to view a particular file via sudoers?

In Linux, I want to allow a normal user to view only one file in a path. How to give the entry in sudoers file. Is the below one is correct? user ALL = /bin/cat
24
votes
4answers
19k views

Why does the system have /etc/sudoers.d? How should I edit it?

Last time, I asked about the risk of these (in /etc/sudoers): user_name ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf %group_name ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf ...
0
votes
1answer
24 views

Can sudoers on a server use my ssh keys if I generate them with a password?

If I set up ssh keys for ssh login (to GitHub for example) from a server that I have access to, can sudoers on that server use my ssh keys if I generate them with a password (assuming they cannot ...
0
votes
1answer
159 views

The risk of vim -Z (rvim)

Last time I asked about the way to prevent risks caused by these configurations: user_name ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf or %group_name ALL=(ALL) /usr/bin/vim /etc/httpd/confs/...
2
votes
1answer
131 views

Get back to sudo group without recovery mode

I made a big mistake when executed command: sudo usermod -G vboxusers me instead of "gpasswd" or "adduser", and I lost sudo group. Is it possible restore it, if I dont know root password, and have ...
0
votes
1answer
290 views

amazon linux yum update changed sudo root permissions

I ssh'ed into my server, ran sudo yum update, and now I'm asked for a password to sudo anything. Looking back through update logs, I noticed this: /etc/sudoers.d/cloud-init saved as /etc/sudoers.d/...
0
votes
0answers
3k views

sudo - /etc/sudoers is world writable on Ubuntu OS

By mistake I change the permission of /etc/sudoers file on Ubuntu OS, now when applying any command using sudo, its giving error, sudo: /etc/sudoers is world writable sudo: no valid sudoers sources ...
0
votes
1answer
34 views

disable users from creating new shell instances

Is there any way I can disable users from creating new shell instances through sudoers file? also disable them to set any environment variables? I would like to write a line in the sudoers file ...
1
vote
1answer
91 views

force sudo to forget password immediately after exit everytime

If I execute sudo su, I am asked for my password ( [sudo] password for ... ) After do some stuff, I can leave this root mode with exit. If I execute again sudo su, I will not be asked for a password ...
0
votes
1answer
287 views

output of sudo -l confusing me

(habdbsync) NOPASSWD: ALL, (habdbsync) !/bin/sh, !/bin/ksh, !/bin/csh, !/bin/tcsh, !/bin/zsh, !/bin/bash, (habdbsync) !/bin/su, (habdbsync) !/usr/bin/ssh, !/usr/bin/scp, !/usr/bin/slogin (root) /...
0
votes
1answer
111 views

Replacement for “su user_with_sudo; sudo -s” for user without sudo-rights?

Let's say I have two user accounts: user (without any sudo permissions) user_with_sudo (with all sudo permissions) Now, I'm logged in as user but want to do something as root, e.g. switch to a ...
1
vote
1answer
143 views

Adding group permissions with sudoers with NOPASSWD still prompting for password

Fedora 20, clean install. I added the following lines to my sudoers file with visudo: %power ALL=NOPASSWD: /sbin/shutdown I then created group "power" and added my account to this group. ...
2
votes
1answer
587 views

Prompted for root password even with sudoers edited with NOPASSWD

I'm trying to configure my sudoers file so that I'm not prompted for a password every time I need to access root privileges. I'm still getting prompted for my password, so if anyone has advise on ...
0
votes
1answer
73 views

Username expansion in sudoers file command possible?

I have the following in my sudoers file : User_Alias DU=%domain\ users DU ALL = NOPASSWD:NOEXEC: /sbin/mount.cifs \\\\* /home/* -o sec=krb5\,* ,/bin/umount -t cifs /home/* This works, users who are ...
1
vote
0answers
258 views

allow sudo user to execute multiple commands for only ONE file

I'm trying to allow only one user to be able to use only 'cat,head,tail' on some of the log files. What is the exact syntax to use here. I tried user ALL /bin/cat /var/log/maillog Which works ...
1
vote
1answer
26 views

Disable an #include instruction in sudoers

Can a sudoers #include instruction be disabled with an additional # character? Or rather just delete the leading # character? (I wish I would understand what the sudo developers had on their mind ...
0
votes
1answer
662 views

ubuntu superuser got corrupted

I was trying to save times to type password for sudo because one of my scripts had to be randomly repeated quite often. I googled some information about how to bypass typing password and applied to ...
0
votes
0answers
177 views

how to make my ldap client as sudo user in mac

I loged in as ldap client against ldap server authentication. when i open terminal and enter sudo -i, i get an error message that this user is not added in sudoers file. what to do get root ...
0
votes
0answers
66 views

sudoers: allow users to remove from their home directory

I'd like to add a sudoers rule that says users are allowed to remove files from their home directory , but I don't see any way to limit arguments to be a subdirectory of the users' home. Is there any ...
0
votes
1answer
390 views

Permission denied on sudo remove

I have two users userA and userB. userA has permission over a file named cache. I want to give permission to userB to remove the file. I have made following entry in /etc/sudoers file : userB ALL=(...
1
vote
1answer
821 views

Run startup script with another user

I have two users user1 and user2. And tomcat has owenership of user1 and started with user1 only. I need to make a rule for user2 such that user2 can starts/stop tomcat but tomcat should always be ...
0
votes
1answer
545 views

Sudo Cmnd_Alias Optional Arguments

I would like to allow a command to be run under sudo with or without arguements. For example, both of these should work: rm -f /etc/stuff rm /etc/stuff/item.txt To get this to work, I need this ...
5
votes
1answer
3k views

'user is not in the sudoers file' but actually is

I have already read a lot of posts about enabling sudo-access for a specific user but those couldn't help me so far. The situation is: I'm running Debian Testing. On the system there are only two ...