-1

i tried to lock pidgin application through the following code written on another thread

 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:~$ 

this has locked the app but now clicking on the app its not opening. it should ask for the password i suppose but thats not happening any way to unlock the app ? or i went wrong somewhere in locking?

10
  • With what reason would you do such a drastic thing, and what was the post that advised you to? Dec 31, 2014 at 7:01
  • Which post are you referring to?
    – Wilf
    Dec 31, 2014 at 7:09
  • 1
    Can't you find a "milder" solution here: askubuntu.com/questions/548568/… or here: askubuntu.com/questions/445145/password-for-apps/445184#445184? You cannot run pidgin now because only root has permission run it. (and a password is only asked when you use gksu <application>. Dec 31, 2014 at 7:19
  • 1
    There is this thing called Guest Session @ShubhiDimri
    – xangua
    Dec 31, 2014 at 7:22
  • 1
    this is what pidgin should be: -rwxr-xr-x 1 root root. resetting the permissions will do the job. (755 indeed, as suggested by @Wilf) Dec 31, 2014 at 7:25

1 Answer 1

0

It should already be owned by root so the chown command is not necessary - this:

sudo chown root:root /usr/bin/pidgin

Changes the ownership and group to be owned by root - it probably was owned by root in the first place, as could of be shown by ls -l /usr/bin/*, so was not necessary.

This command is what 'locks' the app:

sudo chmod 700 /usr/bin/pidgin

This change the permissions so the pidgin can only be read, written to, and executed by the owner (in the case, root - manual for chmod here). So to run it, you would have to run it as root with something like:

#sudo pidgin

Without the #. but DON'T RUN IT

However, that is a really bad idea (SO DON'T RUN IT), as any malicious code (there shouldn't be, but some things online can be evil) that is run could infect the system as root has access to everything - also as it run as root it can't use any of the configuration you made as your normal user, as root is a different user entirely.

To 'unlock' it so you can access it, run:

sudo chmod 755 /usr/bin/pidgin

This changes the permissions back.

To lock an app, try the answers @Jacob suggested above:

Can't you find a "milder" solution here: askubuntu.com/questions/548568/… or here: askubuntu.com/questions/445145/password-for-apps/445184#445184? You cannot run pidgin now because only root has permission run it. (and a password is only asked when you use gksu <application>

Also, with commands you find on the internet (most on this site are ok - check all of the answer, the other answers, and comments first though), it may be ideal (particularly when run with sudo as root) to look up info on the command with chmod --help, man chmod, or online, so you can find out what the command actually does.

3
  • that just solved the problem but theres one more now ie every time i start ubuntu it ask for "unlock keyring" every time i have to enter password how this can be cured? Dec 31, 2014 at 7:38
  • What for? This probaly is something different, when you have setup and online account such as email etc, for some programs is stores the password in a keyring - try this question: askubuntu.com/q/495957/178596 . Did you run chmod on any other programs?
    – Wilf
    Dec 31, 2014 at 7:44
  • thanks a lot everyting is fine now i deleted my online account and now its not asking for unlock keyring, thanks a lot Dec 31, 2014 at 7:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .