5

Is it possible to disable installation of non-free or proprietary softwares and applications in Ubuntu?

Jjed
  • 13,874
Roshan
  • 51
  • 2
    This is tricky, because it involves giving users some admin privileges, but not plain old sudo, which would let them modify allowed software sources. I believe either /etc/sudoers or AppArmor will hold the ideal answer, and have tagged this as such. – Jjed May 22 '12 at 07:38
  • 3
    I think you might have to disable restricted and multiverse software sources in the first place. But after that it will be tricky, since you'll have to stop people from installing certain software (that is not only by apt and PPA but by downloading or compiling themselves). So giving users no right to install software might come closest because you'll have a very hard time trying to make apt/dpkg/make etc. figure out whether software is free (and therefore allowed to be installed) or not. – moewe May 22 '12 at 10:37
  • 2
    You need to disallow all compilers/interpreters or the user might write their own proprietary software. – Wulfhart May 25 '12 at 20:41
  • 2
    @Wulfhart Software is only meaningfully non-free if its users don't have freedom with respect to it. If I write software and I am the only user, that is by definition free software. If I write software and license it (only) non-freely to someone, it is non-free for them but my freedom is still intact. For people writing their own software to be a problem here, they would have to offer it to other users of the same free-software-only machine, but deny them freedom. It seems like telling users of your server not to do that on your machine is better than any technical solution. – Eliah Kagan May 26 '12 at 02:46
  • 2
    Give freedom to choose free and non free softwares ,You dont have right to force user to use free softwares only :) – Tachyons May 26 '12 at 03:00
  • Maybe the Virtual Richard M. Stallman could be of use, too. – unor Feb 17 '13 at 08:12

2 Answers2

4

Tell them don't install non-free softwares. If this doesn't work, try:

  1. Create user group powerusers, users in this group can only install certain type of softwres.

    # addgroup powerusers
    
  2. Edit /etc/sudoers, grant powerusers the privilege to sudo apt-get only:

    %powerusers ALL = (ALL) /usr/bin/apt-get
    

    Now, users in powerusers group can only sudo apt-get ..., but can not sudo dpkg -i <downloaded.deb>, or edit file /etc/apt/sources.list. Only you can determine which sources to include.

  3. Remove non-free, restricted, multiverse sources from sources.list files.

Done!

Lenik
  • 10,398
  • 1
    They can still install proprietary software in their home directories from binary installers or from source (some proprietary software does distribute source, just restricts what you can do with it too much to be FOSS). I'm guessing the OP just wants to know how to give a user some restricted administrative abilities, though, and for that this answer should work. – Eliah Kagan May 26 '12 at 02:36
  • Umm.. What can you do to their home directory?? – Lenik May 26 '12 at 02:37
  • 2
    I don't think an app residing in the user's home dir can really count as being installed at all. – Mark Paskal May 26 '12 at 06:19
1

It is technically impossible!

Since the IQ level of a computer is zero, it can't detect whether the software running on it is free software or not. The only one thing you can do is advise users to use free software only. :-)

Tachyons
  • 17,281
  • 2
    I'm surprised the IQ level of computer is zero. I had overestimated its IQ for a long time. – Lenik May 26 '12 at 04:05