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
0answers
15 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
8 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
22 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
0answers
31 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
22 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
31 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
22 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
23 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
29 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
13 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
37 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
92 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
42 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
45 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
1answer
26 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 ...
1
vote
1answer
88 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
425 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
31 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
29 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
55 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
61 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
137 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 ...
9
votes
3answers
870 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
38 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
62 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
58 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
37 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
90 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
61 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, ...
3
votes
0answers
90 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
0answers
31 views

ssh indirectly to root

Is there a way to ssh to root on another machine even if PermitRootLogin is set to no, but ssh to a user is allowed and this user can just sudo -i to become root. For simple commands, I think there ...
0
votes
3answers
49 views

ssh config with sudo

I'm backing up my local machine to a remote server. Because I want to backup the whole local machine, even files that my local user doesn't normally have access to, I'm doing it using sudo, so the ...
0
votes
0answers
80 views

Gammu Error 500

I want to send server alerts as SMS messages from Ubuntu (13.04). I've downloaded gammu and installed - but I don't get very far. I have set the config file like this: [gammu] port = /dev/ttyACM0 ...
0
votes
2answers
76 views

Why does sudo fork before executing the process?

This question may seem a bit silly, but since in Unix-based systems, replacing an executable's image is done in a single step, replacing the currently running process, in the function call execve (and ...
0
votes
1answer
55 views

No command sudo found on Debian server

I want to have GitLab under domain git.blue-world.pl. I use Omnibus package downloads for GitLab CE for Debian 7. ssh -l login blue-world.pl cd domains/git.blue-world.pl/public_html wget ...
0
votes
2answers
76 views

Changing date on Ubuntu without sudo privilages

I am trying to automate a time change on Ubuntu 10.04 with a bash script using the date command. The script works, but it requires sudo privileges, however, the user who will execute the script does ...
0
votes
0answers
428 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
26 views

I removed the sudo,the I have no permission to install any program?

It's seems like a big problem. I can't login as root, because I use the fedora20, and I can not use sudo. What can I do now ?
2
votes
1answer
31 views

'Syntax error' while setting sudo.conf askpass variable with visudo

I want to set askpass program for sudo, i've made file /etc/sudoers.d/path-askpass with following content: # Path to askpass program Path askpass /usr/bin/ssh-askpass File was edit with visudo, ...
0
votes
1answer
17 views

Strange behavior when sudo -u

I'm trying to set up daily backups of my postgres database. To that end I've created a /home/backups directory, and inside it the /home/backups/postgres directory. The owner of /home/backups/postgres ...
0
votes
0answers
10 views

How to make an exception in a pam module?

I have 2 servers: A and B. I want A to connect to B via ssh (as a non-root user) to run a sudo command. But sudo on B requires a yubikey input to allow the command: auth required pam_yubico.so ...
0
votes
1answer
44 views

Running opera as a different user in linux

I am trying to run multiple opera instances as different users simultaneously in linux mint. I have done it with firefox in the past using the sux command like sux user1 firefox But if i try that ...
0
votes
1answer
27 views

Suse root group not having root rights?

I am in the root group of a suse machine but when I use sudo -u <myAccount> ... I get a Root privileges are required for... a few terminal commands: $ cat /etc/sudoers: ALL ALL=(ALL) ...
0
votes
2answers
79 views

Broken sudo on Google Compute Engine

Error : [ri@myinstance-1 etc]$ sudo su - sudo: >>> /etc/sudoers: syntax error near line 120 <<< sudo: parse error in /etc/sudoers near line 120 sudo: no valid sudoers sources found, ...
0
votes
2answers
102 views

how to undo sudoers file

I accidently command the root admin and sudo in sudo visduo file. Now with current user it is not rolling it back because i can't access it any more. File does not get opened with command sudo visudo ...
2
votes
1answer
407 views

sudo su “username” vs. su “username”

Please explain me, what is the difference between: sudo su "username" vs. su "username" Which has higher privileges? If I log into root with sudo su "username", I am root for one command only? So it ...
0
votes
1answer
113 views

sudo cp with wildcard syntax doesn't do anything in Linux

I have a directory containing files that are owned by root, from this directory I wish to copy all the files ending with errorAll to another directory. My wildcard syntax is correct because performing ...
1
vote
2answers
182 views

How to run command without “sudo”?

Nagios on my server isn't working properly. It can't execute command lftp without "sudo". Is there a way how to allow nagios run commands without using "sudo"? My /etc/group: ...
1
vote
1answer
37 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 ...
3
votes
2answers
78 views

What makes the differences between `sudo CMD` and `sudo su` followed by `CMD`?

I have an SSH server with key only auth and I want to add a key for a new user. I log in with one user(kidmose), I try to append the key to a new user's(remote) authorized_keys and it fails: ...