Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

It would be OK if it was only with my login password, but I would like to lock both midori and Firefox so that they cannot be used without entering a password. I'm running 12.04.

share|improve this question
    
You want to prevent your username from accessing firefox? Or block every other user except you from opening firefox? –  medigeek Aug 3 '12 at 7:40

3 Answers 3

Use ProfilePassword add-on for firefox. This would lock your firefox profile and whenever you run firefox it will ask for the password you set through add-on preferences.

Yes, these do not provide advanced security. But it's good enough just to prevent someone using firefox. I'm using it for some time now and had no problem yet.

share|improve this answer
    
Good suggestion! –  izx Aug 3 '12 at 7:34
    
+1 Good Link :) –  Emerson Hsieh Aug 3 '12 at 7:57

Even if you somehow lock just the browser but leave your computer/account logged in, it's quite possible for anyone to go in, open a terminal, and get the details of your Midori/Firefox history, cookies, stored passwords, etc.

Therefore, it's best to simply lock your screen/computer whenever you are not using it instead of ever leaving it open. Then your login password is required before anyone can do anything with the computer.

Use the Ctrl+Alt+L keyboard shortcut to quickly lock the computer whenever you are not using it.

share|improve this answer
    
just wondering is there a way to allow only one user to access Browser using SUDO , i mean privileging applications to run using sudo only :) –  atenz Aug 3 '12 at 5:48
1  
@tijybba: yes, just changing ownership to root and possible removing the execute permissions should do it -- but that still leaves the data open to anyone who can use a terminal... –  izx Aug 3 '12 at 7:36
1  
@izx No need to use a terminal, just open a file browser and choose to show hidden files (dot-files). It's all right there. –  Michael Kjörling Aug 3 '12 at 12:19

You can block users (that is, system identifiable users, e.g. users that are created using adduser command, that login separately etc) or users that don't belong in a group (here "webapps").

Find the executable file for firefox:

$ which firefox
/usr/bin/firefox

Change mode (user permissions) from 755 (default) to 750 (not executable and not readable by "others" except for owner and group):

sudo chmod 750 /usr/bin/firefox

Create a group webapps:

sudo addgroup webapps

Add current user ($USER) in webapps group:

sudo adduser $USER webapps

You have to logout/login for changes to take effect.

You may add any other user, e.g. mytestuser:

sudo adduser mytestuser webapps

Change the owner and group from "root" (default) to "webapps":

sudo chown webapps:webapps /usr/bin/firefox

Try running firefox:

firefox

Your user can execute/open firefox, others cannot. If you logout/login with a different user that is not in "webapps" group, you won't be able to execute it. Only users in the webapps group may execute /usr/bin/firefox now.

Revert changes using:

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

Note: This doesn't stop the user from downloading a pre-compiled version of firefox (e.g. from http://www.mozilla.org).

share|improve this answer
    
eviluser:~$ cat /usr/bin/firefox >~/firefox 2>&1 && chmod 755 ~/firefox && ~/firefox –  Michael Kjörling Aug 3 '12 at 8:14
    
@MichaelKjörling How does 750 permission sound? :) Come to think of it, my answer doesn't stop the user from downloading a compiled version of firefox from mozilla.org/en-US and executing it :P –  medigeek Aug 3 '12 at 11:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.