Questions related to the sudo command that allows users to run programs with the privileges of a different user (normally the root user).

learn more… | top users | synonyms (1)

23
votes
3answers
150k views

I want to copy a directory from one place to another via the command line

I want to copy a directory from one place to another folder. sudo cp is the command, but after that what should I type? The destination or source first?
0
votes
3answers
6k views

/etc/sudoers is owned by uid 777, should be 0

When I use the command like: sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs I get an error like /etc/sudoers is owned by uid 777, should be 0. What should I do?
1
vote
2answers
50 views

sudo and apt-get not found

I'm handling server as RA which was passed down to me by another graduated RA but I'm new and fresh to this environment facing a few issues right now. The server is setup by the graduate RA from ...
0
votes
1answer
14 views

Converting .pcap files to .txt using tshark

I am trying to convert my .pcap packet capture files generated by tcpdump into a text format. I am getting a permission error whenever I try to convert the .pcap file or even just port ">" the stdout ...
4
votes
3answers
13k views

Can't open Gedit as root

When I run sudo gedit /path/to/some/random/file I get the following error ** (gedit:6262): WARNING **: Command line `dbus-launch --autolaunch=7f8731869e1c690b8205727e0000000a --binary-syntax ...
1
vote
0answers
22 views

How do I get Super User access in guest

I have recently installed Ubuntu via Wubi Installer. The dual-boot works fine but when I can't login as Admin, it only allows me to enter via "Guest". To do any administrative activities such setting ...
0
votes
2answers
15 views

What is the proper way to enable sudo for myself on a new installation?

Is booting into recovery console to gain root access to "sudoers" file the proper way to enable "sudo" for myself on a clean Ubuntu 14.04 LTS installation? If yes, how do I do it? If no, what is the ...
66
votes
4answers
433k views

How do I start/stop mysql server?

I try find in internet some article where describe how correct start -stop mysql server. I find this article: How to start/stop MySql server on Ubuntu 8.04 | Abhi's Blogging World I run this ...
0
votes
0answers
7 views

x11vnc - How can I allow only certain users to have a VNC session

On my server, all but port 22 (ssh) are closed. VNC is possible, but only with a VNC-over-ssh method. Right now x11vnc is started -forever at boot. With the right ssh tunnel, anybody can initiate a ...
6
votes
4answers
42k views

How to run applications as root?

I am having some strange issue with Kate and Kwrite. When I click on Open File, it crashes with segmentation fault. I am a complete newbie to Linux, and I think the issue is that I am not running ...
0
votes
0answers
11 views

how to install canon capt driver in ubuntu 14.04LTS [duplicate]

i have downloaded the canon CAPT driver but i do not know how to install the driver
1
vote
0answers
22 views

gksudo equivalent for Ubuntu Touch

Is there a gksudo equivalent (or Cpp / Qml api call) that lets you ask for a password in a graphical way on Ubuntu Touch? Thanks
0
votes
3answers
5k views

sudo pecl command not found

I'm using ubuntu 12.04 I installed php pear using this command sudo apt-get install php-pear php5-dev I got this results Reading package lists... Done Building dependency tree Reading ...
0
votes
0answers
30 views

I can't update using apt-get update in the terminal [duplicate]

i want to update ubuntu using sudo apt-get update but when i do i get this: sudo apt-get update E: Type 'sudo' is not known on line 2 in source list /etc/apt/sources.list.d/mono-xamarin.list E: The ...
0
votes
0answers
12 views

How do I make myself admin? [duplicate]

My dad made himself admin, and locked me out when he gave me this computer about 5 years ago (running Ubuntu 12.04, can't update). He no longer has his sudo password, and now I can't install new ...
2
votes
2answers
6k views

How to fix sudo: setreuid(ROOT_UID, user_uid): Operation not permitted error?

I am using LDAP authentication on my Ubuntu 11.10 server. I installed libpam-ldap, and configured things accordingly. It works great, except that I get this error every once in a while when I try to ...
0
votes
1answer
18 views

How do I enabel my VPN on my standard account?

I use a VPN client named MullvadVPN I have to use from time to time. I use a Standard profile for my day to day work and the problem is that the VPN client have to have Sudo access to run. And since I ...
0
votes
1answer
10 views

Allow users in the “exampleuser” group to run su -c exampleuser

I want to modify sudoers so that users in the group www-data can switch to the user www-data without a password. I know it is possible, but I don't want to break my system. Here's what I have so far: ...
0
votes
0answers
22 views

How to whitelist commands to certain users in Ubuntu

I have heard that there is a way to whitelist certain commands to users in Ubuntu. Such as allowing a user to run rm but not rm -r or rm -f. Hope someone can help.
2
votes
0answers
43 views

How to add flags and/or arguments to a command in the 'sudoers' file

How would I add flags and/or arguments to allow users in the sudoers file to run certain parts of commands, such as only allowing a user to run sudo rm and not sudo rm -rf? I am using 14.04. # # ...
0
votes
1answer
3k views

Starting and Shutting down LAMPP with sudo access

I have read somewhere on net that we can install LAMPP (apachefriends.org/en/xampp-linux.html) in such a way that any user can start and/or stop LAMPP server using nobody Is is possible? Let me know ...
1
vote
1answer
35 views

Sudo: sessions still open not unmounting

Ubuntu Trusty Tahr 14.04 is running on my computer. By mistake the sudoers file on my computer was edited and now looks like this: Defaults env_reset Defaults ...
0
votes
1answer
41 views

error in running bash script as root

I have a simple shutdown script which i want to run as root shutdown -h +30; echo "succesfull"; I have followed these answer1,2 to make my script root. first I run this command sudo chown ...
3
votes
2answers
94 views

Certain commands not working for a user with sudo after adding to `sudoers` file

I cannot seem to allow the user (In this case Ruby) to run sudo rm -rf, sudo rmdir, or sudo mkdir. I have tried it with other commands and it works fine allowing that user to run sudo apt-get update ...
-1
votes
0answers
20 views

Already Setup Up sudo NOPASSWD but Still Prompts Password

I've already set NOPASSWD option in sudoer file for my account, however it still prompts me to enter the password when I'm using sudo. My customized line is: nolan ALL=(ALL) NOPASSWD:ALL ...
3
votes
5answers
21k views

Add AD Domain user to sudoers from the command line

I'm setting up an Ubuntu 11.04 server VM for use as a database server. It would make everyone's lives easier if we could have folks login using windows credentials and perhaps even make the machine ...
68
votes
3answers
131k views

How to run sudo command with no password?

How does the ubuntu user on the AWS images for Ubuntu Server 12.04 have passwordless sudo for all commands when there is no configuration for it in /etc/sudoers? I'm using Ubuntu server 12.04 on ...
1
vote
2answers
93 views

Slow sudo and ssmtp (hosts file problem)

I'm running an Ubuntu Server 12.04.5 LTS and when I type sudo su it takes 30+ seconds to open the shell. Searching on internet, this problem seems related to the file /etc/hosts and /etc/hostname. ...
3
votes
1answer
49 views

Suddenly can't run sudo

I didn't do anything on the computer except Internet for a few days and suddenly when I tried to do: $ sudo apt-get update I got: sudo: effective uid is not 0, is /usr/bin/sudo on a file system ...
-1
votes
0answers
18 views

sudo cannot be executed in a terminal (14.10) [duplicate]

i want to update true terminal but when i enter sudo apt-get update i get the following respond: sudo apt-get update [sudo] password for tjarco: E: Type 'sudo' is not known on line 2 in source list ...
0
votes
3answers
253 views

making nano always run as sudo by default

my problem is that i keep forgetting to write sudo before every time i use nano, and eventually what happens is i work on a file for a while and don't have permissions. i remember hearing somewhere ...
0
votes
0answers
26 views

Ubuntu no desktop+sudo error [duplicate]

OK so I recently wanted to make my system run faster. What I did was wrote a script using gedit and I saved it in my etc/init. I also had to change up some permissions. When I rebooted my system and ...
0
votes
2answers
48 views

Shutdown privileges problem

I have found that when I click the shutdown button when logged into a normal user account that once it has terminated all running processes and it says something about a modem shutting down, it can ...
11
votes
5answers
1k views

How could I list all super users?

I want a command to list all users who have root privileges i.e. sudo ? Suppose I'm a sudoer user. How could I know all other sudoer users?
0
votes
1answer
31 views

My server can only be run in sudo su [closed]

I have a Ubuntu server 14.04 and I can only use any user from Sudo su but I want to use a use normal without sudo su. Is there a way to disable sudo su (root)
0
votes
1answer
30 views

Can a user with ssh keys set their own password after logging in with keys without knowing their password?

I'm playing around with a script to create a user across a number of machines. I'd like to not know the users password at any time, but having the public SSH keys is quite acceptable to me. The user ...
1
vote
1answer
39 views

Ubuntu Server Change Username [duplicate]

I currently only have 1 user account on my ubuntu server. I would like to change the user name without creating another account. Is there a way to do this? Any help would be greatly appreciated.
2
votes
0answers
29 views

How to change the timeout between sudo sessions? [duplicate]

What is the default timeout interval of a sudo session? How to edit that?
0
votes
0answers
57 views

find only works with sudo?

I've been searching for a while now and I can't find an awnswer to this. Let's assume I created this dir /Desktop/things and I want to find it using find. If I do find . -name things -type d ( and ...
10
votes
2answers
192 views

Run only parts of a script as sudo, entering password only once

I am writing a script (actually a combination of scripts and makefile) that installs external dependencies: some apt-get commands, some git cloning, building, installing, adding users to groups, ... ...
-1
votes
1answer
75 views

Where can I find the sudo commands to work on the ubuntu grub file?

I am a newbie and need help with the sudo command. I am trying to edit the grub.cfg file via the etc\default\grub. The problem is that I don't know the sudo commands, particulary, the permission ...
1
vote
3answers
90 views

Get current ssh session's originating IP without being superuser

I am trying to find out the current ssh session's originating IP address. I found the following to be useful, but it requires sudo: $ sudo netstat -tapen | grep ssh | awk '{ print $5}' | sed ...
4
votes
1answer
13k views

sudo: /usr/lib/sudo/sudoers.so must be owned by uid 0

Whenever I try to do anything at all that requires my password it returns this: u7ur7l3@ubuntu:~$ sudo sudo: /usr/lib/sudo/sudoers.so must be owned by uid 0 sudo: fatal error, unable to load plugins ...
1
vote
0answers
15 views

Warning message when using sudo [duplicate]

So I'm on Ubuntu 14.04 and for some reason every time I use sudo or log in as root I get the following message: grant@grant-G551JM:~$ sudo apt-get build-dep python-pygame sudo: unable to resolve host ...
2
votes
1answer
124 views

Error, even with sudo: “dd: failed to open ‘/dev/sda1’: Permission denied” (dd input piped from gzip)

My command which doesn't work: sudo gzip -dc sda1.image.gz | dd of=/dev/sda1 returns the following error even before I've had a chance to enter my password: dd: failed to open ‘/dev/sda1’: ...
38
votes
5answers
86k views

What are the differences between “su”, “sudo -s”, “sudo -i”, “sudo su”?

I already read it from manual but I can't see difference.. su - change user ID or become superuser sudo -s [command] The -s (shell) option runs the shell specified by the SHELL environment ...
1
vote
1answer
32 views

Difference between su and sudo su [duplicate]

Asking because of curiosity. :) When I type sudo su It asks for my user password. And when I type just su It asks for the root user password. But both the commands directs me to the root ...
2
votes
3answers
38 views

Trying to install software from user account but getting denied

user@main-desktop:~$ sudo apt-get python-cheetah [sudo] password for user: user is not in the sudoers file. This incident will be reported. So that is what I get when trying to install something ...
2
votes
0answers
25 views

Creating a normal user without sudo access but with ability to switch to another admin user

User A - can't be part of sudo or admin group, ssh keys based identity setup for ssh login, can't be a guest account User B - no home folder, must have a password, can't have independent ssh login, ...
29
votes
2answers
57k views

Run a shell script as another user that has no password

I would like to run a script from the main ubuntu shell as a different user that has no password. I have full sudo priviledges, so I tried this: sudo su -c "Your command right here" -s /bin/sh ...