Ask Slashdot: Ubuntu Lockdown Options?
First time accepted submitter clava writes "We have a desktop Java testing application that is going to be administering tests to students on lab computers running Ubuntu 10.x. These computers are used by the students for other purposes and we're not allowed to create special users or change the OS configuration. When the testing app is launched, we need to restrict users from exiting the app so they can't do things like search the internet for answers or use other applications. Is there a good way to put an Ubuntu machine in kiosk mode or something via our application and have exiting kiosk mode be password protected? Any ideas are appreciated."
I'm afraid if you want it actually locked-down, you're pretty screwed. You can't really disable things like switching to a tty with ctrl-alt-f1 without "changing the OS configuration."
Why not let them use resources? Similar to what they will have available to them in the workforce.
Create your own custom locked down kiosk boot image and require users to boot from that? Keep in mind that users might take the boot media home with them so they'll have a copy of the test app if you store it locally (as opposed to retrieving it from a website)
Here's an example:
http://jacob.steelsmith.org/content/ubuntu-kiosk-based-910
(I'm not vouching for this particular implementation, I just found it through a quick google search).
Not sure how hard this would be to do, but it seems like it would be fairly easy to boot from a livecd/usb key. If you remove packages you don't want the end user to have access to (it's hard to browse the web for test answers if there's no browser installed) that should address at least some of your concerns. An added bonus is that if you need to repurpose the machine, or if it doesn't need to be in test mode all the time, a simple reboot could restore it to a vanilla version of the OS.
Facts have a liberal bias.
Pull out the Ethernet connection. TADA!
did you even google your question?
http://lmgtfy.com/?q=ubuntu+lockdown
maybe this will help you
http://ubuntuforums.org/showthread.php?t=456549
http://users.telenet.be/mydotcom/howto/linuxkiosk/ubuntu01.htm
http://library.gnome.org/admin/system-admin-guide/stable/menustructure-13.html.en
It's not a typo if you understood the meaning!
Just use the default Unity desktop bundled with recent Ubuntu releases. It's so fucking unusable in every respect that malicious and benign users alike will want nothing to do with it. They'll use only the Java testing application solely to avoid having to deal with Unity.
You'll never have to worry about them using Facebook, or adding additional users, or installing their own software. Even long-time Unity users have a whole fuck of a lot of trouble doing those things. Many just learn to accept that they never be able to.
I'd suggest having a whitelist of allowed process names that are allowed to be running during the test as that user. If any other programs are running when the program starts, it should not allow the test to be started until those programs are shut down (add a "kill all" button for newbie users). It should also have a watchdog that polls to make sure that the system is still clean. If it finds any unwanted programs, it should give the user 10 seconds to kill them or fail the test (or require a password to ignore this process). If you can do this in the same thread as the testing program, and in such a way that you can't just attach gdb and pause execution while you google the answers, you're onto a winner.
Hey, asshole. Ever occurred to you that, given clava's high UID, he/she isn't a geek and don't know enough of Linux/technology to do this? Look at how this question was redacted: it's obvious that he/she is not in control of the system, and is looking for some info here, where people with knowledge gather. Just answer the question if you can help and don't be pompous.
I rarely respond to comments. Also, don't ask for clarifications: a brain and Google are faster, believe me!
WTF Man. Maybe they are a math/english/whatever teacher using some sort automated grading system. Maybe they're a good teacher but bad with computers? But NO! Unless you crafted it yourself bit by bit then its tantamount to "cheating".
No Technology required:
1. Announce anyone caught cheating WILL fail the course.
2. Post exactly ONE proctor at the rear of the room. His job is to catch the FIRST cheat.
3. The first cheat should be escorted from the room, and given the following choice: become the proctor and catch another cheat, or fail. If you catch a cheat, you may retake the test and the cheat becomes the proctor with the same choice.
Lather, Rinse, Repeat.
I recommend you film for future entertainment value.
Red
KDE has had a kiosk mode for quite a while, leading me to believe it's quite mature by now. It even has a GUI setup tool.
LTSP has support for some lockdown options, and Ubuntu has support for LTSP. It's meant for running classrooms. You can netboot the clients into LTSP when you want to do an exam, and they can run their own install the rest of the time.
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
More or less, probably the easiest way of doing it would be to boot a CDROM and load the home directory over the network if need be. I haven't gotten it figured out, but you can load ISOs directly from disk using GRUB2 if need be.
http://www.panticz.de/MultiBootUSB
Yep, that's the idea. That's how you get so many idiot grads of top-tier schools who cram (or cheat) through ultra-hard tests but still can't use apostrophes correctly while experienced tech-level (Associate's or Military/trade school) employees are cadding complex drawings, using layout software to design and build boards, breadboarding, running Matlab simulations, writing software, and otherwise finding all of the problems that engineering should have found in the design phase.
And from what I've seen, the ability of an engineer is directly proportional to how many books are in the bookshelf in their office or cubicle. Work and life are both open-book, why shouldn't school be? As others have said here, an open book means nothing when the person doesn't know how to apply their knowledge to make sense of it.
Take somebody who only develops Windows applications in C#, give them a book on embedded Linux, and tell them to get to work on the new hardware widget. If they can't "get it" in a reasonable time frame, then it becomes apparent that they don't have the fitness to apply their knowledge.
If you're worried about a user jumping out of your app and then searching the Internet, and you're in a a testing setting, you should be looking at a wholistic approach.
Your students will break your application, it's only a matter of time. Use other approaches to make this a useless option.
1) Don't allow any Internet access from the network layer, at all, this includes DNS servers. Ideally your systems should be on a completely disconnected network, meaning there are absolutely no external network connections.
2) Use SELinux to lock down your system. SELinux uses a mandatory permissions model, meaning you *must* be granted permission to be able to do anything.
3) Lock down alternative means of cheating. Cell phones, paper notes and so forth.
4) Follow through with punishing cheating in an appropriate manner.
5) Listen to the feedback of your users (Instructors and Students). This may seem counter intuitive, but it can help you build a better system.
---- Fight to protect your right to keep and arm bears! ummmm... ya I think that's right....
you forgot: "and design a new test every year, for each class, and different from all tests ever put out by the tens of thousands of universities over the years, coz those will end up on the interwebz".
since you're obviously not mediocre, i guess you're volunteering, genius ?
The Cloud - because you don't care if your apps and data are up in the air.
1. Take bribes from other students to be the first one to cheat.
2. Blatantly cheat and get caught.
3. Become the proctor, and ignore everyone now cheating.
You're looking for a technological solution to a pedagogical problem. Redesign the questions and let them have all the Internet access they want.
Actually, an easier way to fix this (that will go away on reboot) is:
1. Student logs in as normal, opens the test app.
2. You SSH in and kill -9 the window-manager.
3. Result: your test app is running full-screen, and there is no way to exit.
To restart the WM, you would need a shell, or Alt-F2 [and the latter is usually a feature of the WM]. There is a neater way to make this all happen if you write a shell-script. Create a desktop startup script that does something like:
#!/bin/bash
killall -9 gnome-panel
killall -9 metacity
while : ; do java-test-app; done
Then shut down the machine afterwards using Alt-SysRQ-{R,S,E,I,U,B}
Am I - 13 year long Linux user - missing something here, or isn't it that simple? ... I'm kinda weary, since no one else yet offered that sort of answer.
Please enlighten me if I'm mistaken.
The only thing you're missing is the submitter's requirements:
These computers are used by the students for other purposes and we're not allowed to create special users or change the OS configuration.
It's also likely that the submitter is not technically savvy enough to configure or alter the source code of his Window Manager enough to lock it down securely.
0) install Fluxbox
1) edit the keys file and remove the right-click option (disable the other hotkeys too)
2) have firefox set to launch at startup
3) use the firefox addon 'Kiosk mode' and edit settings
That should protect you against most undesired activity.
"The price good men pay for indifference to public affairs is to be ruled by evil men." ~Plato (427-347 BC)
You run the VM in another VM, of course.
VMception, it's VM's all the way down, and all that.
Seriously, this is the best answer I have read here so far. It is simple and elegant. No booting custom images, whitelisting sites, or any of that.
Also, gotta love that half of the answers are: just give a different test, who cares about cheating, just install a different operating system, just fail anyone who cheats, yada yada yada. Why do so many Slashdotters always feel like the best answer to a question is "you're doing it wrong"? Sheesh.
This is exactly the solution I would have proposed, except it goes against the users requirements.
Disabling TTY access requires changes to the OS configuration which he is not allowed to make. Furthermore in Ubuntu, you can't just kill the current X session and start a new one from the command line with the application as the window manager, because it will helpfully restart X when it crashes (or is intentionally killed). You would either need to create a special user whose default WM is the application you want to run, or you would need to reconfigure the OS graphical login settings, neither of which he is allowed to do.
User applications are intentionally prevented from locking down a machine, otherwise any old piece of malware could do so. The only way to really lock it down to modify the OS configuration. That is why all the other answers are suggesting round-about ways to achieve the same goal. IMHO adamdoyle's is the best.
I do not carry such information in my mind since it is readily available in books. ...The value of a college education is not the learning of many facts but the training of the mind to think.
-- Albert Einstein
Was he a slacker too?
Time spent memorizing stuff is time that could be better used understanding it. Having no access to reference material is a ridiculous limitation.
Dilbert RSS feed
Look at this photograph. It depicts Einstein working with various equations.
Do you suppose he knew what the operators did? That he knew differentiation and integration rules? That he knew algebra? Or are you suggesting that he went back to his 101 textbooks at every step.
It is the most absurd thing to use Einstein to defend willful ignorance.
Yes, you do actually have to know stuff to learn how to think, guide your intuition, solve problems efficiently, and discuss topics intelligently. Get over it. Learning and understanding takes work beyond typing your query into Google or Alpha.
Someone asked a very similar question on Stack Overflow. It's here. The short version is: if you're running KDE and can change the window manager configuration, no problem. If you can change which window manager, then sure. (Also, the previous "yank the ethernet cable" or "boot off of live CD/USB" suggestions are quite reasonable. However, it is possible to handle most of it in the application using JNI to write X-Windows code which will capture most all keystrokes. It doesn't get ctrl-alt-backspace, but it appears to get prevent most of the rest.
I do not carry such information in my mind since it is readily available in books. ...The value of a college education is not the learning of many facts but the training of the mind to think.
-- Albert Einstein
Was he a slacker too?
Time spent memorizing stuff is time that could be better used understanding it. Having no access to reference material is a ridiculous limitation.
How did this quote come to you? From memory?
You want the taste of dried leaves boiled in water?
I worked on this project for a Primary school. It's worked well for >2 years for 120 pupils.
http://linuxcentre.net/wiki/
The parts about automatically resetting the homedir after reboot is probably of interest to you.
http://linuxcentre.net/wiki/index.php/Detailed_Maverick_Meerkat_OS_Netbook_Customisation below Home_Directory_Synchronisation
I studied computing at Imperial College London and there was such a setup for lab exams. It would lock down the Linux machine so you couldn't communicate with the Internet or with other computers in the lab, but it would communicate with a central server so you could submit your work. You could contact the Department of Computing to ask if they still have this system and if they would share it.
-- Ed Avis ed@membled.com