The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
24 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
62 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
59 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
62 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
43 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
62 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
189 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
45 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
23 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
30 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
223 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
44 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
74 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
767 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
24 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
0answers
76 views

let virtualbox guest user access VBoxControl

I want to write a script to startup a virtualbox vm and execute some commands once the openbox session has begun. I read that I can do this using the guestproperty method in VBoxManage, provided I ...
0
votes
1answer
85 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
167 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
0answers
69 views

How to restrict sudoers with relative path

I'm trying to set up the sudoers file to allow users to run any excutable file under a directory. Example : /opt/tivoli/tsm/client/ba/bin/* How can I restrict the user not to any relative paths? ...
0
votes
1answer
140 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
82 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
17
votes
4answers
11k 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
103 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 ...
2
votes
1answer
106 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 ...
3
votes
0answers
116 views

How to prevent security flows caused by sudo vim? [closed]

I learned doing sudo vim causes security problems. For example, user_name ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf or %group_name ALL=(ALL) /usr/bin/vim ...
0
votes
1answer
229 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 ...
0
votes
0answers
2k 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
31 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
81 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
177 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
102 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
123 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
433 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
68 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
188 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
23 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
534 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
144 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
57 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
340 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 ...
1
vote
1answer
678 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
425 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 ...
0
votes
2answers
83 views

remove specifying the full path in sudoers

I am trying to add a NOPASSWD entry for 'sudotest.sh' (or any script/binary that requires sudo) in my /etc/sudoers file (redhat) but in order to make it work, I must specify the full path. The ...
1
vote
1answer
731 views

How can I override a default of rootpw in sudoers

I have a sudoers file with many entries. At the top is a Defaults setting: # default sudo password is the ROOT password (not the invoking user's password) Defaults rootpw However there is one ...
4
votes
1answer
210 views

Passwordless sudo works for one user, but not for another

I struggle to create passwordless sudo for one user on my Debian server. I've added the following line to the sudoers file: deployer ALL = NOPASSWD: ALL but it doesn't work. To my surprise, I can ...
0
votes
0answers
43 views

What is wrong with this configuration of sudoers file?

I have to execute a shell script as another user, but without be prompted for password. I've edited the etc/sudoers file with visudo, adding the following line. _www localhost=(otheruser) ...
0
votes
2answers
4k views

How do I fix an invalid /etc/sudoers file if root access is disabled?

This pertains to my Raspberry Pi, on which I have Raspbmc installed. I do realize that there is a Raspberry Pi StackExchange site, but I figured I might get more eyes on this problem here. The issue ...
1
vote
0answers
63 views

sudoers syntax for specifying a list of executables

I want my user (username "wim" in group "wim") to be able to use sudo apt-get and sudo dpkg without needing admin password. I tried editing sudoers file with sudo visudo, and I added in this line: ...