Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to find a way to finish a horribly boring thesis and I'm a huge procrastinator and easily distracted. A very useful trick was going to the library with an old laptop of mine with Ubuntu 11.04, where I removed the "network-manager" and "network-manager-gnome" packages to disable the internet connection.

Unfortunately I figured out a quick way to reinstall them and now the "magic" is gone. So my question is: Do you know any other way to completely remove the ability to connect to the internet under Ubuntu 11.04? Perhaps by blocking the ability to install new packages?

Since this is in a way a fight against myself, solutions that deal with permissions etc. won't really work, since I know the su password :) I would really appreciate any help!

share|improve this question

migrated from Jul 3 '11 at 21:30

This question came from our site for professional and enthusiast programmers.

I... think we don't really got a technical issue here... :) – vidstige Jul 3 '11 at 20:24
Remove the wireless card from the computer (that's still a separate piece, right?) and give it to whomever you'll be turning your thesis in to, with strict instructions not to return it until you show up with your paper. – jwodder Jul 3 '11 at 20:42
In most modern laptops; they're not removable. If the OP is running Ubuntu 11.04, it can be assumed that it's a "modern" computer. – IDWMaster Jul 3 '11 at 20:44
Remove network cards and cables, put superglue all over any of the plugs or sockets to prevent cards or cables being reinserted, stop posting inane and useless questions and get on with your work! – Mokubai Jul 3 '11 at 21:56
The "know the su password" can be easily fixed by asking a friend to change it and tell it to you when you finish your important stuff. But frankly, you have to finish some stuff, you have a certain amount of time for that, it doesn't seem to be too big (since you're on SU asking for help) and you even want to waste a part of that precious time for creating artificial limitations for yourself instead of using it to finish writing that boring thesis? Now that's funny, just be a man and write it instead. Or just be a man, don't write it and accept the consequences. This is a valid option too. – vtest Jul 4 '11 at 2:45
up vote 1 down vote accepted

While I agree with everyone that this is really a pretty non technical question, I thought I would throw in my two cents anyways. Depending how much effort you really want to go to in order to do this and how recoverable you want it to be, the quickest and easiest to recover mode I can think of is run the following command

sudo iptables -I INPUT 1 -j DROP

If you want to get a little more serious, about it and much harder to fix, find your kernel modules for each NIC or just the NIC's you want to disable and delete them then either rmmod them or reboot the system. You can find the name name of the module by running

ethtool -l eth0

and replacing eth0 with all the NIC's you don't want active. Then to find the kernel modules, let's say in your case your find the driver is e1000e, then run

find /lib/modules/ -iname e1000e | grep '\/kernel\/drivers\/net\/'

That should give you a pretty good view of where the drivers are from there you can delete them if you want though to recover you would need to copy them back from either a package or another backup you made and put them back to where they should be. If for some reason I wanted to disable my NIC in a way that would make sure I couldn't enable it while I was out then I would copy them to a USB fob and leave the fob at home.

Anyways, this is all hypothetical. If you really want to make sure you don't use the net when you shouldn't then you will need to learn to exercise self restraint and personal discipline.

P.S.: If you want to make sure the laptop doesn't access the net again, open it up. If it is a laptop with a WiFi NIC in a mini PCI port then pop it out and throw it away. If it uses an onboard chip for WiFi that is a dedicated chip / it isn't part of the North bridge or South bridge and doesn't provide any other functionality then WiFi then de-solder it and throw it away. If it has WiFi built into a shared chip set then either see if you can disable it in BIOS and have someone else set a BIOS administrator password so you can't change it or just sell the computer and buy one that doesn't have integrated WiFi then go buy some self help books on Getting Things Done and other motivation guides for accomplishing tasks.

share|improve this answer

Instead of trying to find technical ways to sabotage your own computer's Internet access, maybe you should try to stop procrastinating. First; stop posting here with questions that don't belong (which you'll find will already save you some time), second; stop fighting yourself. It won't work. Just work on your paper and try to restrain yourself from clicking a a browser icon until it's done. If that STILL doesn't work, create a new user account WITHOUT admin privileges and DELETE your admin (root) account. That should stop you from getting online, and prevent you from installing any new packages until you find an Ubuntu install disk, boot off of that, then start procrastinating again.

share|improve this answer
I'm not sure one can delete an account which is currently logged in. But on Ubuntu one could remove the sudo rights for the normal user (and the root user has no password anyway). Nice idea. – Paŭlo Ebermann Jul 3 '11 at 21:14
It used to work in the older versions of Ubuntu, and if you deleted the last sudoer account on the system, it would be difficult to get access to root privileges (with the exception of recovery mode). – IDWMaster Jul 3 '11 at 21:25

Does your laptop have a removable modem/lan modal? If so, remove it and leave it at home. But I suspect you'll always be able to find other ways to waste time, so getting a backbone is probably the best solution.

share|improve this answer

Create another user on your system. Try sudo with that user, if the user can sudo you need to remove the user from the admin group to disable that user from running sudo.

Once you've done that, you need to stop yourself from using your regular sudo-enabled account when at the library. So change your password to a long complex one that you can't memorize. Find a large book that you're not likely to carry with you, pick a page, and string together the first letter of each line reading down the page to build your password. Write down the page number, but not the long password.

As long as you leave the book behind, you'll be stuck with the lower-privileged user when you're at the library and won't be able to sudo until you go back home and look in the book.

share|improve this answer
Until he downloads an Ubuntu ISO and bypasses the computer's built-in security altogether. – IDWMaster Jul 4 '11 at 4:31

Let the system automatically log you in and set a password with copy & paste, after you have removed the network manager. If you can't remember the password you are not able to install anything. As long as you have no rescue cd at hand you have successfully destroyed your internet. You could even copy the password in a file and remove the right to read it. Thus you can use a rescue cd later on to get back the access to your system.

share|improve this answer

You must log in to answer this question.

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