Difference between revisions of "Sudo"

From Bashlinux
Jump to: navigation, search
(talk)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
= sudo =
 
= sudo =
== How to run sudo from an application with "No Terminal" option ==
+
== How to run an application with no terminal and sudo privileges ==
 
When need to run a command that requires super user privileges we just add `sudo` before the command and it does run the command as super user in behalf the user that invokes it.
 
When need to run a command that requires super user privileges we just add `sudo` before the command and it does run the command as super user in behalf the user that invokes it.
   

Revision as of 02:01, 4 November 2012

sudo

How to run an application with no terminal and sudo privileges

When need to run a command that requires super user privileges we just add `sudo` before the command and it does run the command as super user in behalf the user that invokes it.

It happens that the command could be called from a script and it will run fine, but when this is called from a desktop entry in Gnome or from an application that is not running from the command line, in that case the `sudo` command just won't run.

We will start to see errors in the applications, weird behavior or just won't run. To check that the application is running fine when invokes the desired command do check the log `/var/log/secure`.

By default `sudo` doesn't run from this kind of applications, so to make `sudo` runs from an application with no terminal do edit `/etc/sudoers` an comment out the line

 # Default requiretty