War Story: "74% of your users are Admins!"
- 5 minutes read - 893 wordsWe saw last time that programmers can be hopeless when it comes to checking version numbers. Now, I’m happy to admit that the situation I talked about then seemed far-fetched. Ludicrous, even. So, I’m back to tell you about a situation I know for sure actually happened, and I know it happened because I was there.
So I was called to a customer site to look at a problem with their Citrix servers. I can’t remember what the original problem was (I didn’t realise questions would be asked so many years later) but there you are, that’s what was happening. Let’s say that the problem was that the servers kept powering off unexpectedly. There was nothing that we could find in the logs, and so everyone was completely baffled. So I got sent to site, with the instructions: “Fix it.”
When I arrived, I was keen to get cracking. But the chap who I’d been assigned to work with had just found a new security tool that he wanted to have a go on. And so, rather than have a fight about it, I fell back on the old consultancy trick of “I get paid either way up.” and let him go for it.
The tool ground away for a fair while, before dumping a report out in text format — told you this was a long time ago. We looked at it, and most of it seemed OK. There was just one small thing — 74% of all of the users had Domain Admin permissions!
“Ah.” we said, looking at the results. “This is bad.” (For people who haven’t studied computer security, this is roughly the equivalent of giving three-quarters of everyone you know, keys to your house and car. In other words, A Very Bad Thing Indeed.)
I went to see the IT manager. “Hi,” I said. “I’m on my way to a meeting,” he replied. “Can we talk later?”
“Sure,” I said. “It’s just that 74% of your users are domain admins.”
“I am no longer on my way to a meeting,” he replied. “What the (series of swears) happened?”
We immediately revoked all of those excess permissions. Unfortunately, the change only takes place at next login, but we didn’t have to worry too much, as these users were logging in to the Citrix servers, and those kept shutting down, so they’d end up having to log in again sooner or later.
But how on earth did they get these permissions in the first place? Well, it seems that these users were using the custom line of business app that our customer had invested heavily in. That was what was running on the Citrix servers, and that was why those servers shutting down was such a problem.
Further investigation revealed that if you ran the application, it popped up a “Permission Denied” dialog now that we’d revoked the admin permissions from users. But after that, it worked fine. And the fix, as communicated from the developers to the Helpdesk, was to give the user admin permissions, and then the error went away. So we changed that helpful tip right away, especially since the app seemed to work fine after the error (until the server shut down).
And so, I went to see the developers, and asked them what was going on. They told me the app needed all users to be admins. I told them that wasn’t happening. They threatened me with the IT Manager. He threatened them with lawyers.
In the end, we tracked it down to the developers doing a check to see whether their code was running on Windows 95 or Windows NT (which were options at the time). Their code tried to open a registry (configuration database) key, and if it wasn’t found, they concluded that it was Windows 95, and if it was, then it was Windows NT. The issue is, the key was secured, so if a user tried to do this on NT but wasn’t a domain admin, they saw the “Permission Denied” message, which was a different error to “Not Found”, and so the check kind of worked, but produced an error. And so, ironically, the test was working — but completely by accident.
I told them to take the check out, and for this customer, always have it return that the user was on Windows NT, because that was the correct result for the Citrix environment. Following another round-trip with the IT Manager, they did. And so, no more calls to the Helpdesk, and no more users getting Domain Admin privilege.
And very soon, no more random shutdowns of the Citrix servers — which had been caused by the users trying to log out, but using the “Shut Down” option, because that’s what they used on their desktop computers, which then shut down the Citrix server. That kicked all of the other users out, but didn’t put anything into the logs, because it was an administrator who’d shut it down, and Windows assumed that admins knew what they were doing. And so, we’d fixed the original problem, and that was another job successfully completed.
(For anyone going “But what about the Shutdown Dialog, which asks why the machine is being shut down, and puts the results in the logs?” — this was NT4, two versions before the Shutdown Dialog was introduced).