For instance, if I needed to lock firefox, and whenever someone needs to access it (under the same username as mine) the usual sudo password prompt should appear. I have disabled password prompt by default under visudo by giving my username 'nopasswd' privilege.
as you have mentioned in your question that , if you want to lock an application that could be accessed by only root means , just change the permissions.
for example I made it for pidgin:
next time onwards if you would like to open firefox means type as
Please note that in some rare cases (but it is something that is true for e.g. Firefox and Chromium), when a command is called, there is a script that is called first and then it is the one that launches the "normal" program executable. If you disable the script from running you will prevent anyone from running the application normally (e.g. from shortcuts or commands e.g.
For Deluge as OP mentioned :
Deluge Consists of
|show 6 more comments|
Generally, the owner of the applications in Ubuntu is root. For example check the applications from
So, to lock Firefox for other users than root, you need to take out the execute permission for group and others. You can do this with the following command: