I can run following command on my Ubuntu 14.04.3 Terminal without any problem:  sudo service network-manager restart [sudo] password for username:  network-manager stop/waiting network-manager start/running, process 5204   If I type sudo service network and then press Tab it is auto completed to sudo service networking. If I type sudo service network-ma and them press Tab no auto-complete occurs.    My question is if there is a service named network-manager that could be restarted by service command why its name is not auto-completed? and How to solve it?  Update:  ls -l /etc/init.d/network* -rwxr-xr-x 1 root root 4479 Apr 28  2014 /etc/init.d/networking
60718
I'm used to create upstart services with a file in /etc/init/&lt;service&gt;.conf and it works perfectly fine, the only thing I'd like to is to have tab completion the same way that every service in /etc/init.d/ have right now.  When writing sudo service xx the name of the service should apear.   Is there a way to add upstart services to that autocompletion list?
26102
I have recently disabled  so that it now prompts me for a password every time.  And though this is good for security, it has caused one slight problem which I haven't been able to figure out a solution for, I am unable to run commands which go along the lines of:   sudo &lt;command&gt; &amp;   In the past I would have run a sudo command before that, it would have cached my password and allowed me to run sudo commands without prompt for the next few minutes, and thus it would allow me to run the command.  But when I run it now as there is no caching before hand and as it starts a new thread immediately and sudo doesn't even prompt me for a password, I am unable to run it in this way.  So unless I run sudo -i before it I am unable to run a command in this format which is becoming rather annoying. So I was wondering if there is any way to get around this and still run programs and commands in this way?  I am running Ubuntu GNOME 15.10 with GNOME 3.18, and specifically the program I want to run in this fashion is etherape if that makes any difference, but I would really like the solution to work for all programs and commands.
36380
On busy days, I'd like to run   $ ./configure &amp;&amp; make &amp;&amp; sudo make install &amp;&amp; halt   on the night and go to bed, hoping the application would automatically be installed. But what I see the next day is the screen where sudo asks me for the password. So how could I run sudo with password in one command line, or is there any other method to do this?
116442
Frequently in Terminal (though I fully expect any answer will work in bash and most others), I type some command, and then get some sort of permission error due to missing sudo.  Okay, so press 'up', hold/hammer 'left', type sudo and hit 'enter'.  It's annoying. More so the longer the command was.  Note that missing sudo is worst case; a typo nearer the beginning than end is similarly annoying.  What I would like, is a way to perform a sort of 'up and home' keystroke. Actually, perhaps those two strokes will do it - but my Macbook keyboard doesn't have Home, so I cannot try.  Bonus points for a way to insert sudo and hit 'enter' auto-magically too, say by CMD+Shift+S.    Can this be done, or am I dreaming?
65241
After running this command - sudo chown -R $(whoami) usr/{lib/node_modules,bin,share} I am not able to run sudo anymore: sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set. How do I fixed that?  I read  but I am not sure what advice to follow and if it's applicable to my case.
112639
Is there any difference between using sudo and using su -c? There are situations where one should be used but not the other?  I was previously using Ubuntu where sudo appears to be ubiquitous but now I'm giving Fedora 15 a try and the idiom su -c appears frequently when I'm trying to learn how to do a few things, although I still see sudo being used now and then.
117246
I've created a user called kafka to whom I am trying to give a sudo access to run only /etc/init.d/kafka commands.   I added the following entry to /etc/sudoers.d/kafka via Ansible:  kafka ALL = NOPASSWD: /etc/init.d/kafka  However, this breaks sudo completely with the following error:     /etc/sudoers.d/kafka: syntax error near line 1       sudo: parse error in /etc/sudoers.d/kafka near line 1       sudo: no valid sudoers sources found, quitting       sudo: unable to initialize policy plugin    Here's the full Ansible snippet:  - name: Create kafka user's group   group:     name: "{{ kafka_group }}"     state: present  - name: Create kafka user   user:     name: "{{ kafka_user }}"     state: present     group: "{{ kafka_group }}"     shell: /bin/bash  - name: Set up password-less sudo for kafka user   copy:     content: "{{ kafka_user }} ALL = NOPASSWD: /etc/init.d/{{ kafka_service_name }}"     dest: "/etc/sudoers.d/{{ kafka_user }}"     owner: root     group: root     mode: 0440   What am I doing wrong?
27663
I just ran this a few seconds ago. I managed to do Ctrl - C as soon as I realized what I started doing.  So far the only directory it's started going through is /bin.  I'm afraid to do anything else. So far I realized I can't use su as my normal user anymore.  Luckily I still have another root terminal open. What do I do?
19472
Since the network manager is troubling me so much I want to replace it (possibly wicd orNM from ppa:volanin).  I do not know how to connect and disconnect to the network through the terminal without using network manager.  I would like a command-line way of managing the network.
383
I updated to Ubuntu 20.04. When I use the default terminal, everything is fine. But if try to use terminator, I cannot use sudo. I get permission denied. Again, only when using terminator.  How can I sudo from the terminator? I really would like to continue to use a terminator.  Edit: I just also noted that it cannot find make either. I guess it's all messed up. I'll try to uninstall it and install again I guess.
67372
Why  do we use sudo to perform a terminal command as an administrative? Why isn't it  admin or something else? Is there a reason for sudo?
109342
Redhat Enterprise Linux 5.10 (No we can't upgrade, please don't ask.)  I have a user, 'tina' who is logged into the system. I need her and user 'lu' to use chmod, chgrp, and chown commands for certain reasons (no they don't know enough to be a security risk, we have daily backups anyway). At first I used sudo nedit /etc/sudoers to edit the file. Whereon I added this line:   tina,lu ALL=/bin/chmod /bin/chown /bin/chgrp   Then I found I have to use the visudo command, which I did, and I saved the file without edits.  So I went to test her use of chgrp and I got an error like "Does not have permission to use this command".    If I change sudoers do the users need to log off unix shell windows and logon again? The man pages didn't say nor did any pages on Google.  Do I have to restart the server?
93268
I was doing some experiment about resource-accessing. By mistake, I executed this command, $ sudo mv /etc/passwd /etc/passwd.bak Then I could not execute any command with privilege(eg. sudo mv /etc/passwd.bak /etc/passwd). When I shut the system down, I could not boot it any more. Afterwards, I restored the passwd file with a LiveCD.  Any other approaches could make it?
57841
I want to give non-sudo access to a non-root user on my machine, there is a user dns-manager, his only role is to run all the BIND commands(rndc, dnssec-keygen) etc.   Now everytime he has to run a command, he types,  sudo rndc reload   Is there a way I can get rid of this sudo, but only on a particular set of commands(and only for dns-manager)?
119967
In the terminal I get Command not found when I type:  airmon-ng start wlan0   What can I do to access the airmon-ng command?
82125
I really miss the graphical "Services" tool from older versions of Ubuntu, but I understand why it had to go. I always have terminals open anyway, so I use (because I have to now, I guess) service --status-all to see what services are running. This would be ok except that the command produces output like the following:   [ + ]  winbind  [ ? ]  wpa-ifupdown  [ - ]  x11-common   I'm guessing that those symbols mean something like listening, blocked, or stopped, but which is which? More importantly, why doesn't the man page say?
118572
I'm working with a support member for a product, and he insists that I need to be root to install a series of patches, and that sudo won't work; he doesn't provide a reason but seems very firm in his beliefs. Browsing Superuser I can't determine any possible reason for this being the case, and in confirmation, when I run:  sudo -l   I get:  ... User [MY USERNAME] may run the following commands on this host:     (ALL) ALL   Getting access from the Linux/server team to actually be root is not an imediate process as I understand, so I'd prefer to install them myself.  Is there any practical reason whatsoever why sudo would behave differently than root for installing software on a server?