6

Seeking harmless pranks or April fools for Ubuntu (one-liners), with which I can bring my colleagues laugh. However, it should not damage the system.

To broad, ok…

  1. Only shell scripts
  2. With a maximum length of 42 (The Answer to the Ultimate Question of Life, The Universe, and Everything.)
A.B.
  • 92,125

2 Answers2

3

A speak out message:

echo 'you are under surveillance' | festival --tts

Probably run this on start-up!

Source: This Thread - http://ubuntuforums.org/showthread.php?t=1074772

3

The most classic

sudo chsh -s /bin/false user

or

sudo chsh -s /usr/sbin/nologin user

The first one will set user's login shell to /bin/false, which is an executable which always returns false, effectively cutting the user out of his account;

The second one will set user's login shell to /usr/sbin/nologin, which is an executable which will always display a custom message (which is intended to warn the user that he is not authorized to login), configurable in /etc/nologin.txt.

You're going to have fun with the second one!


If you don't have the target user's password but you have physical access to the machine:

  1. Hold LSHIFT at power-on to boot into grub
  2. Select the default kernel's recovery mode (e.g. Ubuntu, with Linux 3.19.0-15-generic (recovery mode)) and hit Enter
  3. Select root - Drop to root shell prompt and hit Enter
  4. Run mount -o rw,remount /
  5. Run chsh -s /bin/false user or chsh -s /usr/sbin/nologin user
  6. (Optional) If you chose the second method edit /etc/nologin.txtin the most profitable way
  7. Run reboot
  8. Enjoy
kos
  • 41,268