Unix: Pranks that sysadmins play
link to a Network World piece on sysadmin pranks, with the alias tricks, fake DOS prompt and terminal freeze bits pulled out
Unix: Pranks that sysadmins play
Unix systems administrators tend to be very serious about their responsibilities – except when they’re not. And, when they’re not, the pranks that they play on each other and some of their more annoying users might surprise you.
TL;DR
A catalogue of classic sysadmin pranks that exploit command-line knowledge the victim doesn’t have.
Alias tricks
Redefine a common command to do something weird or break loudly:
1alias ls='echo "Segmentation fault"' # ls now "crashes"
2alias cd='echo "Segmentation fault"' # paired with PROMPT_COMMAND="cd"
3 # so every prompt prints it
4alias vi='ed' # forces the victim into `ed`
5alias sl='ls | rev' # filenames printed backwards
6 # (targets people who typo `ls`)
7alias pwd='cd'
8alias who='logout'
Prompt swap
Make a Unix shell look like DOS:
1export PS1='C:${PWD////}> '
Terminal freeze
Ctrl+S freezes the terminal until Ctrl+Q unfreezes it (XON/XOFF flow control). Leaves people thinking the machine hung.
Sending messages to another user’s terminal
1echo "boo" > /dev/pts/3 # appears on whoever is on pty 3
System-level mischief
- Edit
/etc/hoststo redirect a domain (e.g. mapgoogle.comto127.0.0.1) - Remote-trigger the CD tray (
eject) in a server room for spooky effect - Physically swap mice / keyboards between adjacent workstations
Bonus
The sl command is a real package — it prints an ASCII steam locomotive when you typo ls. Half prank, half punishment for sloppy typing.