As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
We're funding a new Acquisitions Incorporated series on Kickstarter right now! Check it out at https://www.kickstarter.com/projects/pennyarcade/acquisitions-incorporated-the-series-2

[Sysadmin] Nightmare fuel

1171820222399

Posts

  • CogCog What'd you expect? Registered User regular
    Or is it easier to put an exclude for users without a logonhours set

  • AiouaAioua Ora Occidens Ora OptimaRegistered User regular
    @Cog

    I added a conditonal in the last block:
    $Users | ForEach-Object {
        $FullName = $_.Name
        $UserName = $_.SAMAccountName
        $line = ""
        $line += "`"$FullName`","
        $line += "`"$UserName`","
        if ($_.LogonHours) { $line += (OctetToHours $_.LogonHours) }
        else {$line += "no hours found"}
        $line | Out-File $CSVpath -Append
    }
    

    life's a game that you're bound to lose / like using a hammer to pound in screws
    fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
    that's right we're on a fucked up cruise / God is dead but at least we have booze
    bad things happen, no one knows why / the sun burns out and everyone dies
  • CogCog What'd you expect? Registered User regular
    edited December 2017
    @Aioua Same result :confused:

    EDIT: Hang on I might have fucked something up.

    EDIT THE SECOND: I did fuck something up. It worked fine.

    :bro:

    Cog on
    wunderbar
  • AiouaAioua Ora Occidens Ora OptimaRegistered User regular
    its okay when I was testing the fix I kept running against the local copy of the script my admin account could access

    while editing the copy of my script in my normal account's onedrive

    I was all, "what, why aren't these changes doing anything????"

    life's a game that you're bound to lose / like using a hammer to pound in screws
    fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
    that's right we're on a fucked up cruise / God is dead but at least we have booze
    bad things happen, no one knows why / the sun burns out and everyone dies
  • CogCog What'd you expect? Registered User regular
    edited December 2017
    Huh... Okay, so.. slightly weird.

    @Aioua

    It returns the hours twice for every user with configured login hours. I had to dump it into notepad++ instead of excel to see what the hell was going on, but I was getting way more 1s and 0s than I was day/hour columns. Initially it was because copy/paste couldn't handle the length of the line, but it turned out there were just twice as many 1s and 0s as there should have been, and the first set wasn't separated from the second set by a comma.

    This is how it dumped raw out of the CSV, username changed
    "Mouth Breather","mouthbreather",0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0 0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,

    So it actually does finish properly without that superfluous comma you had to remove, then it dumps all the days and hours out again, but WITH the comma. The two are separated by a carriage return as well.

    EDIT Hey lets change that from code to spoiler so it's actually legible.

    Cog on
  • CogCog What'd you expect? Registered User regular
    Aioua wrote: »
    its okay when I was testing the fix I kept running against the local copy of the script my admin account could access

    while editing the copy of my script in my normal account's onedrive

    I was all, "what, why aren't these changes doing anything????"

    This is sorta what I was doing. Local copy on my laptop, copy on the server i'm using on the physical console next to me, had them open in notepad++ and in the ISE, forgetting which I was changing where and if it was open or not and was overwriting by saving on the other machine...

  • AiouaAioua Ora Occidens Ora OptimaRegistered User regular
    @Cog
    fukkin d'oh
    #replace
    $Hours -replace ".$" #some hacky bullshit to get rid of that last comma
    #with
    $Hours = $Hours -replace ".$" #some hacky bullshit to get rid of that last comma
    

    I (for some reason) thought the replace operator modifies the string in the variable, but it doesn't, it just outputs a new string
    so it was outputting the string without the trailing comma unexpectedly, then when it did the actual output it spat out the original unmodified string >_<

    life's a game that you're bound to lose / like using a hammer to pound in screws
    fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
    that's right we're on a fucked up cruise / God is dead but at least we have booze
    bad things happen, no one knows why / the sun burns out and everyone dies
  • CogCog What'd you expect? Registered User regular
    Its no big deal at this point, I got my output, converted the text to columns and just manually chopped off the repeat columns from the resulting excel sheet. Prettied it up with some table formatting, gave it to the manager who wanted it and told them that was as good as it gets.

    It is kinda funny and frustrating when those seemingly innocuous requests turn into a pretty fair pain in the ass. Like, in an enterprise sized environment, there's legitimately no way to get this sort of report in a digestible format. Even in this environment (like 100accounts, about half of which are actually configured for login hours) it's still an unwieldy bitch. Usually dumping info out of AD isn't a big deal, but this specific function is really messy.

  • KakodaimonosKakodaimonos Code fondler Helping the 1% get richerRegistered User regular
    Well, one of our DBAs just managed to run this on a production database.
    DELETE FROM transactions WHERE transactionID IN (SELECT transactionID FROM transactions)
    
    

    RandomHajileFeldornFeralInfidelBaron DirigibleThawmus
  • bowenbowen How you doin'? Registered User regular
    Well, one of our DBAs just managed to run this on a production database.
    DELETE FROM transactions WHERE transactionID IN (SELECT transactionID FROM transactions)
    
    

    :bigfrown:

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
    doomybearVladimerSeidkonaCogFeldornNaphtaliInfidelBolthornApothe0sisAntoshkaThawmus
  • wunderbarwunderbar What Have I Done? Registered User regular
    I hope you had good backups?

    XBL: thewunderbar PSN: thewunderbar NNID: thewunderbar Steam: wunderbar87 Twitter: wunderbar
    VladimerCog
  • ArcSynArcSyn Registered User regular
    Reminds me of the Toy Story mistake.

    4dm3dwuxq302.png
  • VladimerVladimer Registered User regular
    Well, one of our DBAs just managed to run this on a production database.
    DELETE FROM transactions WHERE transactionID IN (SELECT transactionID FROM transactions)
    
    

    oh no

    Apothe0sis
  • CogCog What'd you expect? Registered User regular
    edited December 2017
    Why would a DBA, ostensibly someone who should know better, do such a thing?

    EDIT: Also you typo'd and he's an ex-DBA, right?

    Cog on
  • TheSmackerTheSmacker Registered User regular
    On the bright side, queries against your transaction table will run much faster now!

    ArcSynwunderbarCogSeidkonaVladimerLD50FeralNaphtaliShadowfireSmokeStacksa5ehrenDonovan PuppyfuckerApothe0sisThawmus
  • CogCog What'd you expect? Registered User regular
    Why is it that when a file server is running out of space, it's always the fault of like 3 people.

    TWENTY THREE FUCKING GIGABYTES OF PST FILES???

    ArcSyn
  • AiouaAioua Ora Occidens Ora OptimaRegistered User regular
    Cog wrote: »
    Why is it that when a file server is running out of space, it's always the fault of like 3 people.

    TWENTY THREE FUCKING GIGABYTES OF PST FILES???

    yeah c'mon people

    put that shit up in your O365 account

    life's a game that you're bound to lose / like using a hammer to pound in screws
    fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
    that's right we're on a fucked up cruise / God is dead but at least we have booze
    bad things happen, no one knows why / the sun burns out and everyone dies
  • ArcSynArcSyn Registered User regular
    What are they putting in the PowerPoint?!

    4dm3dwuxq302.png
  • hippofanthippofant ティンク Registered User regular
    Cog wrote: »
    Why is it that when a file server is running out of space, it's always the fault of like 3 people.

    TWENTY THREE FUCKING GIGABYTES OF PST FILES???

    Planescape Torment was a classic, man.

    Apothe0sisTamerBill
  • wunderbarwunderbar What Have I Done? Registered User regular
    Cog wrote: »
    Why is it that when a file server is running out of space, it's always the fault of like 3 people.

    TWENTY THREE FUCKING GIGABYTES OF PST FILES???

    Get a bigger file server, obviously.

    XBL: thewunderbar PSN: thewunderbar NNID: thewunderbar Steam: wunderbar87 Twitter: wunderbar
    Apothe0sis
  • CogCog What'd you expect? Registered User regular
    wunderbar wrote: »
    Cog wrote: »
    Why is it that when a file server is running out of space, it's always the fault of like 3 people.

    TWENTY THREE FUCKING GIGABYTES OF PST FILES???

    Get a bigger file server, obviously.

    I have the storage to give but just throwing disk at it doesn't teach them anything.

    Feldorn
  • LD50LD50 Registered User regular
    Cog wrote: »
    wunderbar wrote: »
    Cog wrote: »
    Why is it that when a file server is running out of space, it's always the fault of like 3 people.

    TWENTY THREE FUCKING GIGABYTES OF PST FILES???

    Get a bigger file server, obviously.

    I have the storage to give but just throwing disk at it doesn't teach them anything.

    It does if you have good aim and a good arm.

    FeralSiliconStewShadowfirewunderbarCogDonovan PuppyfuckerApothe0sisThawmusAegisTamerBill
  • wunderbarwunderbar What Have I Done? Registered User regular
    Cog wrote: »
    wunderbar wrote: »
    Cog wrote: »
    Why is it that when a file server is running out of space, it's always the fault of like 3 people.

    TWENTY THREE FUCKING GIGABYTES OF PST FILES???

    Get a bigger file server, obviously.

    I have the storage to give but just throwing disk at it doesn't teach them anything.

    Not with that attitude it doesn't!

    XBL: thewunderbar PSN: thewunderbar NNID: thewunderbar Steam: wunderbar87 Twitter: wunderbar
    SeidkonaApothe0sisThawmus
  • jungleroomxjungleroomx It's never too many graves, it's always not enough shovels Registered User regular
    So uh.

    Had a client (a legacy one, a Catholic school) get an odd version of ransomware on their mail server.

    I say odd because it didn't propagate across the entire network.

    So, we blow out the entire thing by removing the infected drives, put in some clean ones, and right in the middle of me installing Exchange server, I get booted.

    I log back in immediately and apparently interrupted someone copy/pasting a thing called "vpn.exe"

    None of the other tech companies they deal with were logging in that day, neither was anyone at the school.

    So, yeah, passed that shit on up the ladder to a security company. That's outside of my wheelhouse.

    Feral
  • wunderbarwunderbar What Have I Done? Registered User regular
    in case you were wondering how my morning was going I just spent 10 minutes making a bunch of edits to a backup job then accidentally hit cancel instead of ok.

    XBL: thewunderbar PSN: thewunderbar NNID: thewunderbar Steam: wunderbar87 Twitter: wunderbar
    FeldornFeral
  • MugsleyMugsley DelawareRegistered User regular
    I have 13GB across....10 files but they are all local. I've been disciplined by old Outlook issues/concerns not to keep *anything* in my Inbox anymore. Of course now it's a non-issue wrt Inbox size, but I've already been conditioned to move things.

    I know for certain that I'm one of the more disciplined people about this practice, as coworkers that sit near me typically have over 2000 emails in their inbox. If mine goes above 200, I get OCD ticks.

  • SiliconStewSiliconStew Registered User regular
    So uh.

    Had a client (a legacy one, a Catholic school) get an odd version of ransomware on their mail server.

    I say odd because it didn't propagate across the entire network.

    So, we blow out the entire thing by removing the infected drives, put in some clean ones, and right in the middle of me installing Exchange server, I get booted.

    I log back in immediately and apparently interrupted someone copy/pasting a thing called "vpn.exe"

    None of the other tech companies they deal with were logging in that day, neither was anyone at the school.

    So, yeah, passed that shit on up the ladder to a security company. That's outside of my wheelhouse.

    Windows servers by default allow 2 RDP sessions, so being kicked out and/or connecting back to an existing session means someone else was using your exact same credentials. AKA, your account has been compromised.

    Just remember that half the people you meet are below average intelligence.
    Apothe0sis
  • CogCog What'd you expect? Registered User regular
    edited December 2017
    Mugsley wrote: »
    I have 13GB across....10 files but they are all local. I've been disciplined by old Outlook issues/concerns not to keep *anything* in my Inbox anymore. Of course now it's a non-issue wrt Inbox size, but I've already been conditioned to move things.

    I know for certain that I'm one of the more disciplined people about this practice, as coworkers that sit near me typically have over 2000 emails in their inbox. If mine goes above 200, I get OCD ticks.

    I have more shit to do than manage my inbox I guess. Alternately: I'm too lazy. This is more likely. It's the fucking wild west in there. 4000 items. Most of the automata gets shunted off to sub folders and ignored, but everything that came from someone with a pulse typing it out just kinda hangs out in a big-ol' fuckpile.

    Screw it. There's a search feature.

    Cog on
    DrovekAiouaArcSynRandomHajile
  • MugsleyMugsley DelawareRegistered User regular
    Oh you're not wrong, and I'm certain you deal with a higher volume of messages than I do. I'd say about 10GB of those files is stuff I will honestly never look at again.

    Which reminds me, I can probably delete all those Sent files I have from before 2015.

  • wunderbarwunderbar What Have I Done? Registered User regular
    yes, the search feature in outlook is now more than good enough that I stopped worrying about managing it years ago.

    XBL: thewunderbar PSN: thewunderbar NNID: thewunderbar Steam: wunderbar87 Twitter: wunderbar
    Apothe0sis
  • AiouaAioua Ora Occidens Ora OptimaRegistered User regular
    yeah I only sort things out of my generic inbox folder if they're either various spam i'm filtering out with a rule (ticket notifications, fedex updates, etc), or they're emails with specific instructions I think i'll go back to someday and will be hard to search for*

    everything else stays in my inbox

    they aren't unread at least!

    *those go into a folder under my account level named "Cabinet", an homage to my very first job, where they had Groupwise

    life's a game that you're bound to lose / like using a hammer to pound in screws
    fuck up once and you break your thumb / if you're happy at all then you're god damn dumb
    that's right we're on a fucked up cruise / God is dead but at least we have booze
    bad things happen, no one knows why / the sun burns out and everyone dies
  • SiliconStewSiliconStew Registered User regular
    My inbox is a svelte 4000 items. I purge deleted items older than 6 months so I've only got about 40,000 in there.

    Just remember that half the people you meet are below average intelligence.
  • CogCog What'd you expect? Registered User regular
    edited December 2017
    Aioua wrote: »
    yeah I only sort things out of my generic inbox folder if they're either various spam i'm filtering out with a rule (ticket notifications, fedex updates, etc), or they're emails with specific instructions I think i'll go back to someday and will be hard to search for*

    everything else stays in my inbox

    they aren't unread at least!

    *those go into a folder under my account level named "Cabinet", an homage to my very first job, where they had Groupwise

    There may be 300 unread items in my inbox.

    There would probably be more but sometimes I get tired of looking at the number and I right click and mark all as read.

    Cog on
  • FeralFeral MEMETICHARIZARD interior crocodile alligator ⇔ ǝɹʇɐǝɥʇ ǝᴉʌoɯ ʇǝloɹʌǝɥɔ ɐ ǝʌᴉɹp ᴉRegistered User regular
    Outlook: I use a LOT of rules.

    every person who doesn't like an acquired taste always seems to think everyone who likes it is faking it. it should be an official fallacy.

    the "no true scotch man" fallacy.
    Infidel
  • wunderbarwunderbar What Have I Done? Registered User regular
    The only Outlook rule I really want can never really exist, so I don't use them.
    the rule would be when I get a stupid email from a stupid user, that that user gets fired into the sun. Not the email, the user

    XBL: thewunderbar PSN: thewunderbar NNID: thewunderbar Steam: wunderbar87 Twitter: wunderbar
  • bowenbowen How you doin'? Registered User regular
    I've had to block a lot of domains recently, somehow people are getting ahold of my email and asking me to buy shit.

    It's all local too, like none of it is random nigerian princes. It's all companies that exist in syracuse and they want me to buy their garbage they're selling. And I can find the sales person on linkedin working for them too.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • MyiagrosMyiagros Registered User regular
    We've been seeing those too, lots of dev companies email our support all the time and some of our clients are getting random emails about advertisement space. Very easy way to get yourself blocked or blacklisted.

    iRevert wrote: »
    Because if you're going to attempt to squeeze that big black monster into your slot you will need to be able to take at least 12 inches or else you're going to have a bad time...
    Steam: MyiagrosX27
    bowen
  • CogCog What'd you expect? Registered User regular
    God dammit.

    Look.

    I'm a big fan of security, but there comes a point where you've locked yourself down so much that basic program functions can't basically function programs anymore because you're up every single network packet's asshole with two hands and a flashlight.

  • FeralFeral MEMETICHARIZARD interior crocodile alligator ⇔ ǝɹʇɐǝɥʇ ǝᴉʌoɯ ʇǝloɹʌǝɥɔ ɐ ǝʌᴉɹp ᴉRegistered User regular
    Cog wrote: »
    God dammit.

    Look.

    I'm a big fan of security, but there comes a point where you've locked yourself down so much that basic program functions can't basically function programs anymore because you're up every single network packet's asshole with two hands and a flashlight.

    I apologize for nothing.

    every person who doesn't like an acquired taste always seems to think everyone who likes it is faking it. it should be an official fallacy.

    the "no true scotch man" fallacy.
    wunderbarSeidkona
  • InfidelInfidel Heretic Registered User regular
    bowen wrote: »
    I've had to block a lot of domains recently, somehow people are getting ahold of my email and asking me to buy shit.

    It's all local too, like none of it is random nigerian princes. It's all companies that exist in syracuse and they want me to buy their garbage they're selling. And I can find the sales person on linkedin working for them too.

    Sounds like your email got onto a business registry somewhere!

    OrokosPA.png
    bowenDonovan Puppyfucker
This discussion has been closed.