- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
While we could all probably rewrite this as a single-liner, we must show some respect to the manager who can convert the 'lastLogon' integer value into a usable date and time.
Also, if you've got multiple Domain Controllers, the 'lastlogon' timestamp might not be accurate. Certainly the 'LastLogonDate' field - which is the converted version of 'lastLogon' - can be out of sync by up to a fortnight across your DCs.
Oh, frist too.
Edit Admin
Good to know! So you can add hidden users that won't show up in the report by naming them 1hacker and the like.
Admin
Is the search accent-insensitive? If not, they'd better hope they don't have an Élise on the payroll, never mind an Øyvind.
Admin
This gives me the idea for a cool WTF sorting algorithm. Construct all possible strings in alphabetic order, then walk along that list and pick those that are in your unsorted list. I feel like we are one recursive call away from doing that.
Admin
Wouldn't surprise me if they have a bunch of "test" or "system" usernames prefixed with non-alphabetic characters, and the script works like that for exactly that reason ...