Would it be possible to install packages without admin rights(sudo?) on Ubuntu?

It doesn't have to be system-wide, maybe a private installation within /home.

I want this because I'd like to setup my PC so that you can do anything you need without ever having to enter the escalate your privileges. This way, I can blissfully allow anyone to use my Ubuntu system (on their own account of course) and simply telling them that whenever they are told to authenticate, DONT.

Currently, I can run Banshee, chromium, LO, save data on /home,manage my music library etc without authentication.

However, I cannot install say, VLC or CHM reader without privileges.

I understand that there are some packages that touch the inner workings of my system(e.g linux-kernel-image) where it won't make sense to have a private "/home" installation. And that packages are not neatly labeled "trivial" & "non-trivial".

Nonetheless I would like the system(synaptic?) to try and install without any rights until it cannot proceed, upon which it displays the traditional "You require authentication"

  • 1
    both of you, guys, have answered the wrong question. In fact, user16570 has asked a totally different question than the one you were trying to answer. He JUST wants to install packages without the sudo at the beginning of the command. Installing from sources (like andy recommended) can be as UNSECURE as running apt-get without root permissions.
    – snevs
    May 8 '11 at 18:14
  • Spot on. Don't understand why you are -1... edit: upped you to 0 :->
    – user16570
    May 8 '11 at 21:49
  • Why on earth would compiling and running applications compromise the system? May 10 '11 at 0:02
  • 1
    Possible duplicate of How can I install a package without root access?
    – user.dz
    Jan 25 '16 at 14:21

You should manually unpack the deb, place files somewhere and ensure it has access to the libs it need. Chroot command may help to use dpkg or apt-get, though I don't think many people did it. If you want to make a machine, where you don't need root passwd at all, you should use sudo extensively. Sudo can be tuned to allow only given commands with given parameters passwordless.

  • The part I have issue with is not having to need root passwd. It is having to have escalated privileges even briefly! Using sudo extensively might make my system more vulnerable. Still, thx for the advice
    – user16570
    May 8 '11 at 21:51

I would not advise doing it but you can do it by installing from source code I have found. ie you have to download the source code and build it yourself. However you would have to have all the build essential tools installed first.

Then when you download the source code you could create an apps dir in your home directory and build from source in there.

In general: ./configure --prefix=/home/user/apps make make install

Then add /home/user/apps/bin to your path in your bashrc.

Again I cannot advise this. Why don't you set up a guest user account on your pc or have them logged in as other users or even better get them to use a live pen drive version of Unity 11.04 with a persistent file system and they can boot off of that and install what they want there. Saves messing your pc up.

  • This in itself is good advice! I actually use this technique when I do not have appropriate privileges. However, I cannot expect my mum to install this way... btw Why do you advise against this? Is it about the technique you've described or about what I want conceptually? I am aware of a) guest user options and b)pen drive options but AFAIK a) cannot install new packages and b) has suboptimal performance. thx for the advice though
    – user16570
    May 8 '11 at 21:54
  • If you create a live pen drive using the usb creater app you can make a persistent file on it so that you can add applications etc later...gives it a bit of memory May 9 '11 at 14:36

Use a virtual machine. That will solve all of your problems:

  • Each user can have their own VM which they have root access to.
  • Since the VM is completely isolated from the host, you don't have to worry about anything getting messed up on host.
  • Most virtualization programs do not require root privileges to launch a VM.
  • 1
    How are you supposed to install the virtual machine without root?
    – Suici Doga
    Mar 7 '16 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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