Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
-1
rated 0 times [  -1] [ 0]  / answers: 1 / hits: 7147  / 3 Years ago, fri, august 13, 2021, 3:41:25

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.


More From » firefox

 Answers
2

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.



sudo chown root:root /usr/bin/firefox
sudo chmod 700 /usr/bin/firefox


for example I made it for pidgin:



jai@frank-Jai:~$ sudo chown root:root /usr/bin/pidgin
[sudo] password for jai: $$$$$$
jai@frank-Jai:~$ sudo chmod 700 /usr/bin/pidgin
jai@frank-Jai:~$ pidgin
bash: /usr/bin/pidgin: Permission denied

jai@frank-Jai:~$


next time onwards if you would like to open firefox means type as



sudo firefox


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. firefox). If someone knows where the "normal" executable of that application is located, then he will be able to launch it without any problem through a terminal. In order to avoid this, you have to change the permissions of that executable as well. Firefox's executable is located at /usr/lib/firefox/firefox.



For Deluge as OP mentioned :



Deluge Consists of Deluge and Deluge-gtk . so you have to do that for both .


[#29845] Sunday, August 15, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hamostic

Total Points: 403
Total Questions: 142
Total Answers: 112

Location: Iceland
Member since Sat, Sep 17, 2022
2 Years ago
;