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

2
votes
2answers
60 views

Why does the system have /etc/sudoers.d?

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
23 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
40 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
48 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
21 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
74 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
17 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
40 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
27 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
29 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
20 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
46 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
32 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
40 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
144 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
24 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
17 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
15 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
7 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
41 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
20 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
58 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
76 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
156 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
81 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
166 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
28 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
63 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: ...
2
votes
1answer
182 views

OpenWrt: Cannot install package sudo

I have installed the latest OpenWrt Chaos Calmer r42871 on my TP-LINK WR-842ND router. And everything's good except the problem: root@router:~# opkg install sudo Unknown package 'sudo'. ...
0
votes
1answer
43 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
476 views

su- no password entry for user? installing powerline with pip

I am trying to install Powerline using pip to do the installation. I'm installing in to /usr/local/lib/python2.7/dist-packages/powerline using the su -c "pip install github******" and get the response ...
0
votes
1answer
77 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
987 views

Cannot change the desktop wallpaper in Ubuntu 14.04

I tried installing GNOME packages to Ubuntu 14.04(unity). I used these codes. sudo apt-get install gdm sudo apt-get install gnome-shell sudo apt-get install ubuntu-gnome-desktop ...
0
votes
0answers
56 views

Sudo suddenly not working correctly on OS X?

I have started noticing that commands requiring the use of sudo on OS X Mavericks are failing, e.g. I just updated Meteor and it couldn't write the launcher script sudo cp ...
0
votes
0answers
13 views

How to run a zle widget from an alias

I am using the sudo plugin for oh-my-zsh, which usually is bound to (Esc) (Esc). However, I'd prefer an alias for sudo !!. The plugin actually defines a zle widget, but how can I call this widget ...
1
vote
0answers
48 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
3answers
124 views

Using su - (user) to open privileged port not working

So I wanted to run a Node server on port 80 but I didn't want to run the entire process on root privileges, for security I thought this would be the best. So I thought a good solution would be to use ...
1
vote
0answers
44 views

Is there anyway you can restrict users from executing a command with another name?

I'm not asking an obvious question here. I would like to elucidate with an example. A user 'bob' is always executing 'chmod 777 /home/bob/impfiles' so that user 'alice' could make changes to the ...
1
vote
2answers
109 views

Running Screen after switching users

After switching users (with su) I cannot run screen: % screen -L Cannot open your terminal '/dev/pts/5'. How can I run screen after switching users?
2
votes
0answers
31 views

Can't resume editor running as root

For years, when I have been working over an SSH connection, I will run sudo vi ... to edit a config file. If I need to do something on the command-line, I'll hit Ctrl+Z to suspend the editor, do ...
0
votes
1answer
92 views

sudo ssh asks for passphrase when it shouldn't

I am able to ssh user@remotemachine without password using a keypair with an empty passphrase. However, when I do sudo -u user ssh user@remotemachine it keeps asking for a passphrase. Also sudo -u ...
0
votes
1answer
97 views

Stuck on password even though used --disabled-password option in ubuntu

I created a user in aws ec2 with: ubuntu$ sudo adduser --disabled-password user1 per instructions from: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/managing-users.html After I ssh in as user1 ...
0
votes
0answers
100 views

Script for temporarily disabling internet connection

I want to block internet connection to me for about 8 hours or so on my Linux machine. I have no will power, so simple call for ifconfig down ifconfig up or similar commands doesn't apply to me, ...
0
votes
1answer
86 views

Are there downsides to installing node.js with root privileges?

I'm using the following code to install node: cd /usr/local/src/ wget http://nodejs.org/dist/v0.10.25/node-v0.10.25.tar.gz tar -xvf node-v0.10.25.tar.gz cd node-v0.10.25 ...
0
votes
0answers
30 views

How to restore Debian server's /var/lib datas

I made a big mistake : While administrating and making settings, I accidentally deleted /var/lib folder. The result is that I can no longer use any dpkg commands, so I"ve lost my mysql database. I of ...
0
votes
0answers
46 views

Application not themed when run with gksu instead of sudo

Slightly nitpicky, but when running applications on Linux Mint 17 from a terminal using "sudo", the application gains root privileges and is nicely themed. If I use "gksu" or "gksudo", the application ...
0
votes
0answers
41 views

CentOS 6 Getting Sudo to show the display in a FreeNX session

My platform is a 32-bit installation of CentOS 6.4 with a gnome desktop and the FreeNX server. When I log into an NX session (usually using NoMachine NX Client), and then try to open an application ...
2
votes
3answers
77 views

Why is this sudo command try to run in /root?

I try to run a sudo command via SSH like this: ssh domain.com sudo -u user bash -c "cd /home/user/ && ls" (which is obiously just an example). I get back: /home/user/: line 0: cd: /root: ...
0
votes
0answers
127 views

“qemu-nbd --create” without sudo

I'm working on a custom OS, and the make recipe I wrote for creating a new disk image requires sudo for connecting/disconnecting the virtual HDD image to a /dev/nbdN device. Because I don't want sudo ...
1
vote
1answer
13 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 ...