The sudo command is a program for some Unix and Unix-Like operating systems, that allows a user to execute programs with the security privileges of another user. Typically those of a superuser or the root user.

learn more… | top users | synonyms

1
vote
1answer
13 views

bash requesting password on every invocation of sudo

Within a single bash session I am repeatedly re-running a command prefixed by sudo. Typically the password should be requested once and then cached. However, the present behavior is that the password ...
2
votes
1answer
22 views

Need application to run without root access

i try to build my local services system inhouse, and to thant i need to learn how i can give access to a single user with out type a root access when i do it, or i need to know how i can call the ...
1
vote
2answers
29 views

How to execute sudo NOPASSWD command on other server via SSH

I have read all the post related to the issue. But If you can see mine as well and give suggestion. I am trying to do passwordless SSH and run a script on remote server. But Sudo access ask for ...
2
votes
2answers
35 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
32 views

Jenkins Docker image has no make or sudo

I'm trying to set up CI on AWS using the Jenkins image from the Docker hub. I've gotten a few hours into the process (configuring for a Node project), and I've now realized that a few of my npm ...
0
votes
0answers
9 views

How can I set system-wide timestamp-timeout?

as I understand adding Defaults timestamp-timeout=5 to my sudoers file makes the current terminal remember my password. After typing my password in one konsole and opening another terminal or ...
0
votes
1answer
16 views

Problems with PATH variable as sudo user

I'm having trouble to understand how the PATH variable is affected by sudo. I can run the command activator as a normal user because I've added the path where this application resides to that user's ...
0
votes
1answer
16 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
14 views

Program built from source is unrecognized by the terminal but if i do it with sudo

i've built a program from source in /usr/local/sbin but now if in a terminal i write "program-name" the terminal say that the command was not found. The program is seen by the terminal only if i do ...
0
votes
1answer
39 views

The logic of Disabling Root Login

Ubuntu 14.04 VPS user here. My VPS was hacked twice. And the third version is up. Fingers crossed. The mistake I made in the first two was that I had root + password login enabled. I've learned ...
1
vote
1answer
24 views

strace to discover sudo password persistence location

strace/dtrace/ltrace ... useful for lots of things, from finding hidden access violations to network socket tracing, but maybe it can't see all. I haven't been able to figure out using strace (it ...
0
votes
2answers
72 views

Disable Root — what all issues will arise?

I have a linux server (Ubuntu 14) that I access using root and SSH keys (i.e. no root password). I have also created a non-root-user (and a corresponding non-root-user's-password) with sudo ...
3
votes
1answer
518 views

Ubuntu 15.04: suspend from console without sudo

For years I have been able to suspend my Ubuntu-based machine from regular account using dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower ...
1
vote
1answer
58 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
22 views

Avoid sudo password /etc/apt/apt.conf.d/

Please how can avoid 'sudo' in this command ? ssh -t root@$machine -x "sshpass -p 'ubuntu' ssh -t ubuntu@$address -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/nul -x 'sudo mv 00proxy ...
0
votes
0answers
15 views

World writable sudoers, no root password set

I have Kubuntu 14.04 installed on USB flash drive. Yesterday by accident I did chmod 777 /etc/sudoers. Now I can't set it back to 0440, because I get an error something along the lines of 'File is ...
0
votes
0answers
27 views

Why does sudo -n on Mac OS X always return 0?

It looks like sudo -n on Mac OS X (10.10.3) always returns 0 as a return code. So something like this will always show 0, regardless of whether the user has authenticated with his password first: ...
1
vote
2answers
77 views

sudo alternative to allow certain user to execute chmod from a program

I would like to allow a certain user who does not own the files in a directory to execute chmod on them. Interactively, I know that I can do this by configuring sudo with the sudoers config file(s), ...
2
votes
1answer
174 views

sudo: effective uid is not 0, is sudo installed setuid root? for normal users

strangely I cannot run the sudo command for every new account I create that is not root. The server is completely new and wasn't touched so I don't know what's wrong. for every command I try to run ...
1
vote
1answer
25 views

Always run a program as root without typing sudo on RHLE?

I have a program called 'myprogram'. I want to be able to type, from the cmd line: >$ myprogram and have it automatically run as root. As in I want the above command to be translated to, >$ ...
0
votes
2answers
54 views

sh -c in background

Original version: How to run sudo sh -c "command" in back ground In a terminal sudo sh -c "command" & starts in background but as soon as I press enter, the process exits [test@localhost ...
1
vote
0answers
26 views

Deny access to a specific folder for a sudo user

So here is the case: I am root in an Ubuntu system. I want to give a user (say username is X) permission to execute any command but at the same time I have a folder that I want no one to be able to ...
0
votes
0answers
25 views

sudo-ldap using LDAPv3 for Mac OSX - Possible?

I have been able to setup Mac OSX to authenticate via LDAPv3 and KRB5 to a Fedora FreeIPA server. Took some work - but got it to work. My question now is if it is possible to configure the sudo ...
-1
votes
1answer
32 views

Problems writing a script to build FFmpeg from source

I’m on Ubuntu 12.04 LTS and I’m trying to write a script that will build FFmpeg from source; with the right flags of course. I’m following the instructions here. I’ve nailed most of it except the very ...
2
votes
1answer
62 views

Allow unprivileged user access to specific privileged files

I have a system running hardened Gentoo and I have installed Xorg, Fluxbox, and Conky together to create a minimal window manager desktop. Within this system I have 2 main users, root and my normal ...
1
vote
0answers
47 views

different behavior: “sudo nmap” vs just “nmap”?

I'm attempting to do a simple port scan with nmap: $ nmap 192.168.56.101 Starting Nmap 6.47 ( http://nmap.org ) at 2015-03-10 19:30 IST Nmap scan report for 192.168.56.101 Host is up (0.0048s ...
-1
votes
1answer
56 views

Don't have permissions to save file in Mac OS X using Vim, even after using sudo

I’m trying to edit the following file on my machine: /etc/apache2/httpd.conf First I got an error stating that I don’t have permissions to change the file, fair enough. I then used sudo but I still ...
0
votes
0answers
87 views

Samsung Chromebook series 3 sudo password

I cannot for the life of me find the sudo password for my chromebook. I have it in dev mode on Chrome OS 41. I want to install Arch Linux ARM onto an SD card but the instructions here ...
2
votes
1answer
34 views

Script stops when user is changed

I am trying to create a script that logs as a different user to create a database backup. So far I have encountered a few problems, such as having to input sudo password, or not being able to bypass ...
0
votes
1answer
41 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
0answers
18 views

How PAM module reads /etc/shadow

I am developing a PAM module, which is much similar to pam_unix.so, the default authentication module. I also have a small test app that uses this module for authentication purposes. My module first ...
1
vote
1answer
52 views

Can't run /bin/bash… sometimes?

I’m on a Google Compute Engine which is running Debian Wheezy 7.4. I’ve been noticing strange things recently. For example, I can do sudo bash. But then, from root, I can’t do sudo -u anotherUser ...
0
votes
1answer
179 views

Require bash script to be run with sudo (not as root user)?

I want to require a bash script to be run as the current user with sudo, but prevent it from being run if it was executed as the root user directly. This is because I'm doing some setup actions for ...
0
votes
1answer
81 views

How to remove network-manager access from LightDM?

I'm running Ubuntu 14.04. I didn't like how LightDM gave access to network manager before anyone has actually logged in... So I added 'network-manager stop' to rc.local. It works just like how I ...
0
votes
1answer
118 views

Sudo fails when running as service

I have a program that runs as a normal user but sometimes needs to run a command that requires root privileges. So I made a shell script and gave the user permission to run that script with sudo. The ...
0
votes
2answers
57 views

ZFS send/recieve over ssh on linux without allowing root login

I wish to replicate the file system storage/photos from source to destination without enabling ssh login as root. I've tried a number of different combinations such as: sudo zfs send -R ...
2
votes
1answer
295 views

ssh + sudo + su into login shell

I have several machines I ssh into regularly only for the purpose of using sudo su to spend the rest of my session logged in as some special-purpose user. The general workflow is: mymachine:~ me$ ssh ...
12
votes
2answers
488 views

Difference when using backticks in double quotes and single quotes in Bash

Why to the following two executions differ in output? (I need double quotes for variables in my eventual command) $ sudo su -c "echo `cat /root/root_file`" cat: /root/root_file: Permission denied $ ...
1
vote
1answer
47 views

Renamed dylib, sudo stopped working

I renamed the dylib /usr/lib/libz.1.dylib for testing purposes, but when I tried to change it back I had to realize that sudo mv ... cannot be run because it needs exactly this dylib. How can ...
0
votes
1answer
41 views

Prompting for sudo password in a setuid root binary

I have a setuid root binary, with_sudo.bin, with the following source code: /* with_sudo.c */ #include <stdio.h> #include <sys/types.h> #include <unistd.h> #include <stdlib.h> ...
3
votes
1answer
73 views

How do I trick Nautilus to use “sudo mount” instead of just “mount”?

Thanks to new "security fixes" in mount or mount.cifs (I'm not sure which) it's no longer possible for normal users to mount anything, even if they are explicitly allowed using the user, users or ...
0
votes
1answer
100 views

Run ifconfig without sudo

I have an embedded Linux running on a imx6 platform. This is a freescale embedded linux. The problem is that there is no sudo available for this linux, but I need to activate and deactivate the wlan0 ...
0
votes
0answers
217 views

security: changing sudo permissions in /etc/sudoers on Debian 7.8

I have a single-user home system running Debian 7.8 console with desktop installed but default runlevel 3 boot. I added my limited user account to the sudo group using adduser for the purpose of ...
10
votes
3answers
2k 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
44 views

Mac OSX permissions

Please, before jumping to much appreciated answer, please read this, as my problem is not related to files and folders permissions (chmod and chown). I have a Mac, with 2 user, one is an admin, and ...
1
vote
1answer
69 views

use sudo -s but show current folder name

Is there a way to use sudo -sbut keeping the current folder name in prompt? I want to see jw:documents nescalante$ instead of bash-3.2# when using sudo -s. Thanks!
0
votes
1answer
67 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
51 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
2answers
94 views

Why bother stopping 'root' from ssh login?

Best practice is to remove the ability of 'root' to login over ssh. However, I need to run some Ansible commands and am currently connecting via a user called "amdhske" and then have set this user up ...
0
votes
1answer
84 views

How do I run NetBeans (or ANY .app) as SUDO on OSX?

In addition to running other applications elevated (a bridge which I will burn when to it I get), I need to run NetBeans elevated in order to debug this application that I am writing. I would really, ...