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)

0
votes
4answers
26 views

Unable to find password on sudo apt-get

I want to install some apps. I did: $ sudo apt-get [sudo] password for .....: But I cannot install my apps!
1
vote
1answer
10 views

Is having init 6 function without sudo normal or an oversight?

Since I've been manually updating Ubuntu MATE 16.04 using apt update, upgrade I also manually reboot using this command sudo init 6 Once I forgot sudo and it worked; further testing proved that ...
15
votes
2answers
4k views

Why do I need root privileges to umount a drive at the command line, but not in Nautilus? How to change that?

When I insert a thumb drive, media card, or USB hard drive, to unmount it via the command line, I need to use: sudo umount /media/the_device But, I can unmount the device in a file manager like ...
4
votes
1answer
234 views

Everytime I use a sudo command it says >>>/etc/sudoers.d/90-cloudimg-ubuntu: syntax error near line 1<<<

I got the following error while using the sudo apt-get update command. :~$sudo apt-get update /etc/sudoers.d/90-cloudimg-ubuntu: syntax error near line 1 <<< sudo: parse error in /etc/...
2
votes
1answer
32 views

Can I execute a program with a sudo command through a shortcut? [duplicate]

I've created a file containing these two lines of code: #!/bin/sh sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches" I have ticked (from 'properties') the appropriate box to run the file as a ...
6
votes
2answers
3k views

How to get GUI sudo password prompt without command line?

Currently, for all my commands that require root access, I have to type them out on a command line. I would like for the GUI to prompt me to key in my password, when sudo is required, instead of ...
1
vote
1answer
44 views

Pass sudo command from GUI [duplicate]

I have a shell script using some sudo command. When I run this script from terminal - it asks me for password and runs with any problem. But when I try to run executable shell script form GUI (double ...
0
votes
2answers
4k views

sudo apt-get not working after a new install of ubuntu

I installed ubuntu last night. And after reading 100s of posts, I still couldn't make my sudo apt-get work at all. I remember, I have to modify the software server somehow. But I can't remember how or ...
-1
votes
0answers
16 views

Error with Packages [duplicate]

I had this big red circle with a white minus sign on my notification bar something like this. An error occurred please run Package Manager from the right-click menu or apt-get in a terminal to ...
1
vote
2answers
90 views

Sudo is not asking for password on Ubuntu 16.04

Ever since I update to 16.04 I notice whenever I use any sudo command the terminal does not ask me the password before executing the command,The command is directly executed.I am the admin and I have ...
19
votes
2answers
14k views

“sudo cd …” one-liner?

Occasionally I want to cd into a directory where my user does not have permission, so I resort to sudo. The obvious command sudo cd somedir doesn't work: $ sudo mkdir test $ sudo chmod go-rxw test $ ...
14
votes
7answers
13k views

What are the benefits of sudo over su?

What is the actual benefit that Ubuntu (or Debian derivatives) achieve by disabling root user? Everywhere I read, it says to prevent unintentional damages for inexperienced users. I want to know what ...
0
votes
1answer
25 views

Unable to resolve host <name>

After I enter sudo command in command-line it shows this error : unable to resolve host linux98 linux98 is my PC name. i have tried these solution too : Error message when I run sudo: unable to ...
0
votes
0answers
15 views

Sudo /bin/bash -c 'some command' does not load /etc/environment content, not set the env [duplicate]

I've got a bit confused When I do log in via sudo su - I get full environment loaded $ sudo su - # env SHELL=/bin/bash TERM=screen-256color LC_ALL=en_US.UTF-8 HTTPS_PROXY_HOST=myproxy.com ...
4
votes
4answers
23k 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 --...
20
votes
6answers
26k views

su command + authentication failure

I am having problems with the su command. I know my password and I am typing it correctly but su indicates authentication failure. So I checked on the internet and then went into recovery mode and ...
0
votes
0answers
21 views

What privileges should I give to a user who can access my SFTP but only reads them

I have a current root user which is able to do, well ROOT privileges on my SFTP running on Ubuntu LTS 12.04. I'm planning on adding a new user that can only read a specific directory inside my sftp. ...
2
votes
1answer
4k views

Sudo comes up with an error, cannot run anything as root

For some reason, when I try to run any programs (I am trying to run a rootkit hunter: rkhunter) as root on the command line with sudo like this: sudo rkhunter Then I get this message: You must be ...
7
votes
0answers
63 views

How to make /sbin/shutdown, /sbin/reboot etc. require sudo again in 16.04?

For whatever reason, we do no longer need to be root (or using sudo) to run /sbin/shutdown, /sbin/reboot etc. This seems to be because those executables are now symlinks to /bin/systemctl which ...
256
votes
18answers
307k views

Error message when I run sudo: unable to resolve host (none)

I have this issue on AWS on some servers. Whenever I run sudo the terminal is stuck doing seemingly nothing, until it finally spits out this error message. My terminal looks like this: ubuntu@(none):~...
-4
votes
0answers
46 views

What is it? Help me please [closed]

N: Ignoring file 'trusty-dell-csmb-vivid-skl.list.disable' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension N: Ignoring file 'trusty-oem.list.disable' in directory '/etc/...
1
vote
1answer
8k views

How do I get into recovery mode on ubuntu 14.04 if the option not showing

I just boot up my laptop then run the sudo apt-get update command, but there's an error says: [username] is not in the sudoers file. This incident will be reported. so I search the google ...
55
votes
3answers
268k 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?
1
vote
1answer
4k views

Permission problem with SFTP in FileZilla

Recently, we installed Ubuntu Server on our servers this is very new for us. However, we tried to setup a apache2 server which did work. But the problem is that we can't configure apache and other ...
0
votes
0answers
21 views

sudo command terminal takes a lot of time to ask for password?

In Ubuntu Gnome 16.04 in the terminal it takes a lot of time to ask for the sudo password, for example when I use: sudo apt-get update or anything else.
2
votes
2answers
10k views

sudo must be owned by uid 0 and have the setuid bit set

I am trying to run the following command: d@d-Aspire-M5 ~ $ echo "My username is: `whoami`" My username is: d d@d-Aspire-M5 ~ $ sudo chown -R `whoami` /usr/local/lib/node_modules sudo: /usr/bin/sudo ...
0
votes
1answer
57 views

Missuse of chmod -R 777 ./ [duplicate]

I ran something like: sudo chmod -R 777 /. In my Ubuntu 16.04 LTS it shows many errors on display, but anyway, the damage was done. Now I can't use sudo sudo: error en /etc/sudo.conf, línea 0 ...
0
votes
1answer
46 views

What is the difference between the group root and the group sudo? Why root user by default is not a member of the group sudo?

I am quite confused regarding this matter. As far as I know the user root has all the privelages. Also all the users of the group sudo has all privelages. But the user root by default is not a ...
30
votes
4answers
111k views

How to configure ADB access for Android devices?

I'm using Ubuntu 12.10 and I have installed Android SDK, set it's path in my user .bashrc and it works. The problem is that my phone requires adb to be ran by root for permissions, but running adb ...
0
votes
1answer
34 views

help understanding sudo -s [duplicate]

I was trying out a command yesterday that put my computer into hibernation mode. The first line in the command sequence was sudo -s which made my command line go from userName@computerName:~$ to ...
15
votes
2answers
587 views

What's the difference between login as user and changing users using su through root?

When you have a server of some sort you can access it through, e.g., ssh user1@ip and you can also do ssh root@ip to go to your root user with su priveleges and then go to su user1. In my thinking ...
0
votes
1answer
514 views

Difference between /etc/security/pam_env.conf and /etc/environment + making sudo read pam_env.conf

I struggle to see the difference between pam_env.conf and /etc/environment. To me they both do the same thing, with a difference syntax. The manpages were no help. So what is the difference? ...
0
votes
1answer
16 views

Ubuntu server in azure cloud: no valid sudoers sources found, quitting while restart apache

I am creating a ubunu virtual machine in my azure cloud service and installed the lampp stack and phpmyadmin. Instllation is completed without any problem and for accessing the phpmyadmin i have ...
1
vote
1answer
29 views

16.04: editing /etc/sudoers to allow NetMan restart w/o password

I want to be able to restart Network Manager without having to enter my password every time. I did sudo visudo and added this line: %sudo ALL=(ALL) NOPASSWD: /bin/systemctl restart network-manager....
0
votes
0answers
32 views

Systemd, start user level unit with sudo access

I have a Debian package which installs my software and it needs to start two applications in post install script. First one is daemon and the second one is a background process both are managed with ...
0
votes
1answer
48 views

sudo problem. I can't write my password to terminal

so I was installing python on my laptop :~/Desktop/Python-3.5.1$ su root Password: ssu: Authentication failure` It didn't let me wrote my password. so I looked help and found that: gksu ...
1
vote
2answers
116 views

sudo: unable to resolve host 127.0.0.1kaushal

Yes, Might be duplicate of following links Tried both links solutions but didn't worked for me. Error message when I run sudo: unable to resolve host (none) sudo: unable to resolve host ubuntu-...
3
votes
4answers
10k views

Authentication Failure while accessing super-user privilege

I get the root privilege when I type sudo. But when su asks for the Password, which I type in, the terminal says su: Authentication Failure
72
votes
4answers
21k views

Aliases not available when using sudo

I was playing around with aliases today and I noticed that aliases don't seem to be available whilst using sudo: danny@kaon:~$ alias alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' ...
0
votes
1answer
25 views

E:Type 'sudo' is not known on line 53 in source list [duplicate]

I have done some looking around for a solution. However, I have come to the conclusion that the solution to my problem is just not on the internet. I am unable to update Ubuntu and download apps from ...
0
votes
2answers
121 views

sudo not working at all

this is the error message i get: ubuntu@tegra-ubuntu:/$ sudo apt-get update sudo: unable to stat /etc/sudoers: No such file or directory sudo: no valid sudoers sources found, quitting sudo: unable to ...
2
votes
3answers
10k views

Permission denied for all sudo comands

I just typed "sudo chmod 770 ." on my /usr/bin directory by mistake [acc]:/usr/bin$ sudo chmod 770 . Now every time i run a sudo command I get a "Permission denied" error [acc]~$ sudo bash: /usr/...
-1
votes
2answers
2k views

sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700

I get error message always when i work with sudo command. It shows always sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700. A while ago i changed the permission of /var ...
0
votes
2answers
26 views

sudo -s takes a long time to execute and prompts sudo: was not possible to resolve machine XXX

I do not know what is wrong but now, whenever i use a sudo command it takes a long time to execute and prompts: sudo: was not possible to resolve machine XXX then it executes. It seems that is ...
111
votes
3answers
246k 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
votes
1answer
105 views

Please explain the complete steps involved in the installation of OpenSSH server on Ubuntu [duplicate]

I am having trouble installing openssh-server in Ubuntu. Particularly I want to know how to generate RSA public private key pair and the related concepts. What are the modifications to default config ...
4
votes
1answer
98 views

How is the guest account prevented from using su and sudo?

It's already known that the guest account can't use su or sudo: Why is su disabled from guest sessions? Sudo not available in guest login How is this done? My guess would be apparmor. However, ...
0
votes
1answer
31 views

Without using sudo, copy the file name passwd from the directory /etc to directory /var/student [closed]

please how to solve this question. Without using sudo, copy the file name passwd from the directory /etc to directory /var/student
70
votes
5answers
37k views

When using sudo with redirection, I get 'permission denied'

When using sudo to allow edits to files, I regularly get 'permission denied'. For example, my mouse is jittery and sluggish, so I want to disable polling: sudo echo "options drm_kms_helper poll=N"&...
5
votes
1answer
5k views

sudo: unknown uid xxxxx: who are you?

I was using ssh and trying to upgrade a system from Ubuntu 10.04 to 12.04. The connection had an issue so I had to login again to finish the upgrade. After running sudo dpkg --configure -a that was ...