News for hackers. Stuff that matters.
Re:Got called to a professor’s office after a complaint his ... by shagie on Tuesday July 25, 2023 @01:21AM (#36858263)
There was a system that a bunch of students administered (I was one of the students at the time). We would occasionally prank each other. On this DEC station where memory was scarce, one guy ran emacs.

Another guy wrote a program that forked 1000 copies of itself, nice itself to 19, did a sleep(0) and then exit. As soon as it got any cpu time, it would exit, but it never would as long as emacs was running. Meanwhile, the load (as displayed by xload) became a solid black box.

So the emacs guy would run 'ps -ef | grep procname | xargs kill' as root.

This meant that it had to get some cpu time to handle the kill, which took longer than a sleep(0) and was largely ineffective.

The second time this prank was done, the process was named 'ema'... which promptly also killed all instances of emacs too.

The third time this prank was done, the process was named 'et'. This happened to have also matched /etc/initd and the machine rebooted rather suddenly.

Re:Got called to a professor’s office after a complaint his ... by schoen on Tuesday July 25, 2023 @01:34AM (#36858350)
Somehow I've never considered what will happen on Unix if pid 1 exits!

Even though I'm pretty sure I've run with init=/bin/sh and then typed "exit" at some point in my single-user session, I have absolutely no recollection of the results. I should try it on a few OSes and see!

Re:Got called to a professor’s office after a complaint his ... by suid on Tuesday July 25, 2023 @02:03AM (#36858533)
If PID 1 exits, the system usually panics immediately and restarts.
Re:Got called to a professor’s office after a complaint his ... by rzzzt on Tuesday July 25, 2023 @02:24AM (#36858662)
Re:Got called to a professor’s office after a complaint his ... by rollcat on Tuesday July 25, 2023 @05:30AM (#36859935)
"...and that's why we have to put half a million lines of C in PID 1"
Re:Got called to a professor’s office after a complaint his ... by NikkiA on Tuesday July 25, 2023 @02:00PM (#36866625)
i'm reasonably sure that kill -1 1 used to be a canonical way to `halt`
Re:Got called to a professor’s office after a complaint his ... by mcguire on Tuesday July 25, 2023 @03:41PM (#36868210)
I used to work with a long-time AIX kernel developer. His method of shutting off his machine was "sync; sync; kill -9 1".

Of course, his method of preparing to move offices (a common occurrence at IBM) was to

1. Take his (RS-6000) workstation home with him the night of the move.

2. Otherwise, just lock his desk.

He didn't have anything in his office but his chair, desk, and workstation.

Re:Got called to a professor’s office after a complaint his ... by BrandoElFollito on Wednesday July 26, 2023 @11:50AM (#36879752)
As a random trivia about sysadmins: the reason he sync-ed twice is not because "twice is better than once, just to make sure".

Sync is not synchronous. When it is back to the shell there is no guarantee that data in memory is fully copied to disk.

However, it sets a flag that is reset when the copying is done. Sync will hang if the flag is set.

So the first sync arms the copy and sets the flag and is back to the shell.

The second sync starts, blocks at the flag. The flag gets reset and it is back to the shell.

So the 2nd sync going back to the shell is a guarantee that the first sync is fine and data is safe

Re:Got called to a professor’s office after a complaint his ... by olddustytrail on Tuesday July 25, 2023 @02:54PM (#36867530)
I'm pretty sure psdoom warns you against killing init
Re:Got called to a professor’s office after a complaint his ... by dredmorbius on Wednesday July 26, 2023 @10:27PM (#36888145)
Heck, you wrote an init on bash with the LNX-BBC (at least in some versions of it).
Re:Got called to a professor’s office after a complaint his ... by Aperocky on Tuesday July 25, 2023 @02:40AM (#36858790)
"occasionally"
Re:Got called to a professor’s office after a complaint his ... by shagie on Tuesday July 25, 2023 @12:01PM (#36864358)
Occasionally. It wasn't a daily, or even weekly occurrence. But, in all honesty those pranks were some of the things that helped my early sysadmin experience.

When you have nice, well behaved users you'll not have problems that need solving. When things go awry - that's when you'll need to solve problems... sometimes even without pranks.

Before we had yp set up on the machines, we just copied the password file between them with a note "make sure you change your password on foo" since that was the one we regarded as authoritative and would copy that to bar.

One time, while adding a person to the /etc/groups file for write access to the web server, someone did rcp /etc/groups bar:/etc/password (I suspect it was muscle memory) and, well, now bar was unhappy and wouldn't let anyone log in... or even su to root to fix it. Found someone who had an open terminal and had them do a while 1 sync... and then powered the machine down and brought it back up. It wasn't happy, so started up in single user mode. Just needed to get the password file in there... but the terminal was 300h which didn't have a proper termcap entry for vi or emacs to work. I was a mudder and knew how to use ed... so ed /etc/password and then the contents of the minimal password file were dictated to me. When done, we got it back up and then copied the password and groups files to the proper spots.

Another time (and this was a prank), someone left themselves logged in and someone else created a directory path that was about 3000 characters long. /user/jsmith/I/will/not/leave/myself/logged/in/I/will/not/leave/myself/logged/in/ ... The problem with this is that `rm -rf` won't handle paths longer than 2048 characters long. So it didn't get removed "I'll do it later." You know what else doesn't like paths longer than 2048 characters long? fsck. So when the machine was rebooted/crashed at some point, the root volume (yea, user directories were on the root volume) failed to fsck... and failed to mount. Stuck in single user mode with the backup partition and reading the man pages for mount on the other machine we found how to force a mount without fsck and then had the guy who did the extremely long path fix it (and promise not to do it again) and got machines working.

Re:Got called to a professor’s office after a complaint his ... by arethuza on Tuesday July 25, 2023 @06:43AM (#36860422)
We used to play pranks on each other such as logging into the NeWS server on a colleagues machine and manually setting a small rotation in the transformation matrix for a terminal window that someone was typing in....

NeWS had an interactive PostScript shell and almost no security so this kind of mucking about was trivial...

Re:Got called to a professor’s office after a complaint his ... by jfk13 on Tuesday July 25, 2023 @07:22AM (#36860693)
Ah, good times.... we used to do similar things across the HP Apollo workstations at the place where a friend of mine worked (and I unofficially "borrowed" computing facilities for a project of my own -- though I did also contribute a substantial speed optimization to their main product, so nobody seemed to mind).
Re:Got called to a professor’s office after a complaint his ... by gcr on Tuesday July 25, 2023 @07:55AM (#36860971)
For april fools' day, on my first job as a troublesome ~16-year-old administering our university lab's firewall (academia was a different land when it comes to trust), I set up some automatic network-wide substring replacement filters for incoming HTTP responses to replace `<body` with something like `<body style="transform: rotate(0.1deg);"`. This was in the time before HTTPS was ubiquitous, so it worked on most websites.

Unfortunately, it broke some pages that lab users needed for school. I later learned one colleague wasn't able to complete a homework assignment because of my prank.

Re:Got called to a professor’s office after a complaint his ... by crest on Tuesday July 25, 2023 @10:03AM (#36862388)
The joy of running Upside-Down-Ternet as transparent proxy on April Fool's day.
Re:Got called to a professor’s office after a complaint his ... by hackmiester on Tuesday July 25, 2023 @11:58PM (#36872902)
I last did this in about 2011-2012 and was shocked and/or pleased to discover many images on my friend's Xbox 360 dashboard turning upside down!!