--- Log opened Mon Aug 16 00:00:55 2021 |
01:47 | | Degi [Degi@Nightstar-0kqji3.dyn.telefonica.de] has quit [Operation timed out] |
01:58 | | Degi [Degi@Nightstar-2usuae.pool.telefonica.de] has joined #code |
03:52 | < Mahal> | anyone have any experience with both json and powershell? |
03:52 | < Mahal> | I have one of those "how do I google this" questions because I don't know what to ask the internet to make the answer fall out |
03:52 | <~Vornicus> | I know everything about json and nothing about powershell |
03:53 | <&McMartin> | Same |
03:53 | <&McMartin> | Well, I know epsilon about powershell, not literally nothing |
03:54 | < Mahal> | I can probably manage the powershell side if I know the words to look for so |
03:54 | < Mahal> | https://www.manageengine.com/products/passwordmanagerpro/help/restapi.html#changepwd |
03:54 | < Mahal> | example |
03:55 | < Mahal> | so I can build everything from "operation:" down in arrays, that's easy |
03:55 | < Mahal> | (or hashtables or whatever) |
03:55 | < Mahal> | I don't know what to google to figure out how to make it eat the "INPUT_DATA=" bit |
03:58 | <&McMartin> | That is not JSON |
03:58 | <&McMartin> | That is part of the query portion of the URL. |
03:59 | <&McMartin> | ... do I need to dissect URL parts or is that in your toolkit already? |
04:00 | <&McMartin> | (the JSON object actually starts not at "operation": but at the very first {, and goes until its matching }.) |
04:03 | <~Vornicus> | (json is a thing that it is possible to know everything about, which is nice) |
04:04 | < Mahal> | progress: |
04:04 | < Mahal> | --------- |
04:04 | < Mahal> | @{result=; name=Input data is in wrong format} |
04:07 | <&McMartin> | As someone who has worked with APIs broadly like this in the past |
04:07 | <&McMartin> | This is not your fault |
04:07 | <&McMartin> | But I am also belching rage and fire over here |
04:08 | <&McMartin> | Because what the actual fuck is this doing being a PUT and not a POST |
04:14 | < Mahal> | You tell me and we'll both know |
04:16 | <&McMartin> | I mean, it's configured to be PUT, it says so right there |
04:16 | <&McMartin> | It's just that operations like this, where you're sending a document up to the server... |
04:16 | <&McMartin> | I'm much more used to that showing up as "the JSON goes in the body of the request, as if it were a web page in reverse" |
04:16 | <&McMartin> | Which is roughly what POST is |
04:16 | <&McMartin> | It's much less obnoxious =P |
04:17 | < Mahal> | fuck me, I got it working |
04:18 | < Mahal> | had to put it in a here-string but what the fuck, whatever |
04:18 | < Mahal> | it works |
04:18 | < Mahal> | IDGAF |
04:22 | <&McMartin> | Here strings are a better choice, imo |
04:22 | <&McMartin> | The "sample code" is trying to escape everything and fuck that noise |
04:23 | < Mahal> | basically :trash_dumpsterfire: |
04:24 | <&McMartin> | This is the kind of thing where, if I can help it, I use some kind of URL-managing library that will allow me to build a request up bit by bit and then send it all off. |
04:25 | <&McMartin> | But I imagine PowerShell is generally not that thing |
04:25 | < Mahal> | https://usercontent.irccloud-cdn.com/file/yZ2v1aAk/image.png |
04:25 | <&McMartin> | Meanwhile, Foone is having adventures again https://twitter.com/Foone/status/1413694652822163459 |
04:25 | <&McMartin> | Oh huh, OK |
04:25 | <&McMartin> | That is doing the POST thing |
04:26 | <&McMartin> | That is very much not what their sample request is doing! |
04:26 | <&McMartin> | But that's generally how I'd want to do it |
04:26 | < Mahal> | no, that's doing a PUT |
04:26 | < Mahal> | not a POST |
04:26 | <&McMartin> | That sample request in the thing you linked put that whole body that you have IN THE GODDAMNED URL |
04:26 | <~Vornicus> | mcm are you confusing this with GET |
04:26 | < Mahal> | Oh yeah, and I completely ignored _that_ |
04:26 | <&McMartin> | Vornicus: I am not, check her link and the argument passed to curl |
04:26 | <&McMartin> | (the link to manageengine, not her ircloud one) |
04:27 | <~Vornicus> | oh weird |
04:28 | <&McMartin> | I am broadly aware that GET/POST/PUT are just words and the server can do whatever it wants |
04:28 | <&McMartin> | But I'm used to PUT being "GET backwards" and POST being "I'm putting the real data in the body kthx" |
05:04 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
06:02 | < Mahal> | I am . quite proud of the abortion of a powershell I've been cobbling together |
06:02 | < Mahal> | Creates a password, updates ad accounts,, updates the password manager |
06:09 | < Mahal> | I'm not a real programmer so navigating the murky waters of json was quite an achievement |
06:09 | <&McMartin> | The bar for "real programmer" is very low and by many standards you hit it before a lot of people paid to deliver software do |
06:13 | <&McMartin> | https://www.c64-wiki.com/images/thumb/c/c9/Einschaltmeldung_C64.jpg/350px-Einschaltmeldung_C64.jpg |
06:13 | <&McMartin> | If you're giving the computer a sequence of instructions and then having it do them for you, to save yourself the time, that is as real as programming gets. |
06:14 | <&McMartin> | It's worth noting that shockingly little of, say, React.js or hundreds of other frameworks actually involves setting things down like that. |
06:52 | < Mahal> | as a good friend of mine said many years ago, the first duty of a good sysadmin is to do themselves out of a job |
06:52 | < Mahal> | the particular usecase for this abortion of a script is that we have a handful of generic user accounts that are, unforutnately, required. |
06:52 | < Mahal> | changing their passwords & making them accessible to the needed users is always a complex problem |
06:53 | < Mahal> | so the script will do this monthly; change the script to e.g. Qwerty123Qwerty123!!, change the account's password in AD, push the new password into our password manager, and shoot an email out to interested parties going "oi y'all, it changed, remember to log into PMP if you need it" |
06:54 | < Mahal> | as the current process, erm, imvolves the password being emailedinplaintexttopeopledon'tshootme, it's a much better plan |
06:55 | < Mahal> | and in the process I've learned a bunch about json in powershell / psobject structures (a pile of AUGH), the absolute shitheap that is ManageEngine Password Manager Pro's RestAPI, and how to pass secure strings into Powershell functions because I was determined to functionise the script |
07:41 | <&McMartin> | Does "functionize" here mean "rewrite it so that it uses functions instead of just being a giant linear string of instructions"? |
07:41 | <&McMartin> | *defines and uses |
08:18 | < Yossarian> | err |
08:58 | | Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has joined #code |
08:58 | | mode/#code [+qo Vorntastic Vorntastic] by ChanServ |
12:10 | < Mahal> | Yes McMartin |
12:12 | < Mahal> | So the main part of the script is just "for each account in list, 1) set new password in ad and then 2) update pmp" |
12:15 | <@sshine> | has anyone here set up a Linux virtual network bridge? |
12:15 | <@sshine> | I'm stuck on this step: https://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide#Setup_Linux_Bridge_for_guest_networking |
12:16 | <@sshine> | because I'm doing this on a remote server, I have to reboot it into recovery mode every time I mess up the network configuration, heh. |
12:25 | <@sshine> | I understand the "auto xenbr0" part. the "iface xenbr0 inet [dhcp/manual/static] ... bridge_ports eth0" part, I'm not so sure about: the example has "dhcp", but asks to change to "manual". my server is configured with a static IP, but I don't know if I need to actually provide an IP then, or in case of "manual", what I then need to provide. |
12:25 | <@sshine> | changing "dhcp" to "manual" and restarting the network just kills it, so that's no good. |
12:26 | <@sshine> | eek, I'm running late for my flu shot. |
14:38 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: WeeChat 3.1] |
14:38 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
14:38 | | mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ |
14:40 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: WeeChat 3.1] |
14:41 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
14:41 | | mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ |
14:57 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
14:57 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
15:20 | | catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code |
15:20 | | catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection closed] |
16:56 | | Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has joined #code |
17:55 | | Kindamoody[zZz] is now known as Kindamoody |
18:16 | | abudhabi_ [abudhabi@Nightstar-j0alln.adsl.tpnet.pl] has joined #code |
18:17 | | catalyst [catalyst@Nightstar-64vcfg.dab.02.net] has joined #code |
18:19 | | abudhabi [abudhabi@Nightstar-pjguqd.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
18:20 | | catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Ping timeout: 121 seconds] |
18:42 | | catalyst_ [catalyst@Nightstar-058ijn.cable.virginm.net] has joined #code |
18:45 | | catalyst [catalyst@Nightstar-64vcfg.dab.02.net] has quit [Ping timeout: 121 seconds] |
20:16 | < Yossarian> | Lots of fellow nerds here, anyone start using Linux circa 2000, that would be around the time of kernel release 2.6 I reckon? |
20:16 | < Yossarian> | If so, what was that like? |
20:17 | <&McMartin> | Lost in the noise of general system instability, or an update that you simply didn't bother taking immediately |
20:17 | < Yossarian> | or 2003 I think |
20:17 | <&McMartin> | You used whatever kernel your Linux distro had and mostly didn't worry about it, as an end user |
20:18 | <&McMartin> | That's true even if, like me, you were an idiot who thought Gentoo might produce an acceptable working environment |
20:21 | < Yossarian> | I'm just thinking about the past, I wish I'd gotten on board sooner, despite problems across the board with things like hardware compatibility and such. |
20:21 | < Yossarian> | board, board |
20:25 | <~Vornicus> | I was also that idiot |
20:25 | <~Vornicus> | I also tried mandrake |
20:25 | <~Vornicus> | they all honestly sucked |
20:25 | <~Vornicus> | also tech support was incredibly impossible |
20:27 | <&McMartin> | I spent the late 1990s working almost entirely on Unix machines of various flavors. |
20:27 | <&McMartin> | Linux was not yet fit for purpose at that point. |
20:28 | <~Vornicus> | in the late 90s I had just moved to windows from mac for the first time |
20:28 | <@TheWatcher> | I was using the m68k build of Mandrake in early 99 on my old A1200, I do remember that. |
20:28 | <&McMartin> | I don't think I saw it being good for *anything* until 2004 or so, when nVidia had (a) GPUs worthy of the name and (b) functioning Linux drivers for them. |
20:28 | <@TheWatcher> | That was... an experience |
20:28 | <&McMartin> | The first actual Linux lab I saw was a graphics lab, and surrounding it was Solaris and HP-UX |
21:11 | <&[R]> | <Vornicus> I also tried mandrake <-- Mandrake was my first distro. It was pretty amazing, the gcc they shipped would compile programs that would segfault if you fopen()'d a file that didn't exist. |
21:12 | <&[R]> | Naturally, as I was interested in Linux as Windows as a dev environment was increasingly pissing me off (specifically the MSDN URL thing). As a result I was kind of annoyed. But I put my focus and attention into PHP instead of C for a bit, and dealt with it that way (I was already quite competant in PHP) |
21:14 | < Yossarian> | <&McMartin> I spent the late 1990s working almost entirely on Unix machines of various flavors. |
21:15 | < Yossarian> | It would have been a great blessing to have been born a decade or so earlier with access to VAXen or other micros remotely via dumb terminal, but then again... the future is bright now |
21:16 | <&McMartin> | I was at school, so these were labs of Sun or HP workstations, mostly. |
21:16 | <&McMartin> | Though in the "dumb terminal" space, in the early 2000s I did actually make regular use of SunRays! |
21:16 | | * Vornicus pokes around, finds a parser, yay, don't have to learn to write one himself this week |
21:20 | | catalyst [catalyst@Nightstar-64vcfg.dab.02.net] has joined #code |
21:22 | | catalyst_ [catalyst@Nightstar-058ijn.cable.virginm.net] has quit [Ping timeout: 121 seconds] |
21:30 | | catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code |
21:32 | <&[R]> | Oh fun, brand new keyboard, and the enter key stopped working |
21:32 | | catalyst [catalyst@Nightstar-64vcfg.dab.02.net] has quit [Ping timeout: 121 seconds] |
21:48 | <&[R]> | ... and I don't think these are supposed to be hot swappable key machanisms. OOPS |
21:48 | <&McMartin> | oh no |
21:51 | <~Vornicus> | D: |
22:10 | < Yossarian> | <&[R]> Oh fun, brand new keyboard, and the enter key stopped working |
22:11 | < Yossarian> | That's like the time I stopped at Best Buy to buy a new Logitech G5 and I lost the receipt and it was dead out of the box. |
22:11 | < Yossarian> | I was pissed |
22:21 | <&[R]> | I would've contacted the manufacturer directly at that point |
22:21 | <&[R]> | I've had some good luck doing so |
22:31 | <&[R]> | Okay, so my first ever soldering job did not fix the issue |
22:31 | <&[R]> | Time to try again |
22:42 | | Kindamoody is now known as Kindamoody[zZz] |
22:49 | < Mahal> | I used Linux in the early 2000's, mostly for uni purposes |
23:08 | | catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [The TLS connection was non-properly terminated.] |
23:11 | <&[R]> | OMFD |
23:11 | <&[R]> | !!!! |
23:12 | < Mahal> | ? |
23:12 | <&[R]> | I got it working aghain :) |
23:12 | <&[R]> | Now to put all the screws back in, and the caps back on |
23:18 | <&[R]> | I lost my right ctrl key in the process |
23:24 | | Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has quit [Ping timeout: 121 seconds] |
23:24 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
23:36 | <&Reiver> | I futzed with Linux seriously circa 2002 onwards for a few years |
23:36 | <&Reiver> | The people insisting that This Was Linux's Time and it was So Close To Being The Windows Killer were... |
23:36 | | * Reiver ahems |
23:38 | < Mahal> | Wrong~ |
23:39 | <@Tamber> | "2021 will be the Year Of Linux On The Desktop™, honest, we mean it this time." |
23:40 | <&McMartin> | The year of Linux on the Desktop was the year that you could build a server room by jamming it full of micros. |
23:41 | <&Reiver> | whut |
23:43 | <&McMartin> | In 2000, not only was Linux on the Desktop a sick joke, so was Linux in the Server Room |
23:43 | <&McMartin> | Linux in the Server Room is now completely anodyne. |
23:43 | <&Reiver> | oh wow |
23:44 | <&Reiver> | Even in the ~2002+ era that was ... blithely assumed to be what Linux was /for/, if it had a purpose as such |
23:44 | <&Reiver> | At least by those around me |
23:44 | <&Reiver> | It is possible I was surrounded by zealots >_> |
23:44 | <&Reiver> | ... ah they were thinking of webservers though |
23:44 | <&McMartin> | Yeah, those machines were running Commercial Unix wherever I was looking, and then Linux hit a threshold and damn near wiped them all out a stroke |
23:44 | <&Reiver> | I can believe it |
23:44 | <&Reiver> | Do you know what the threshold was? |
23:45 | <&McMartin> | Not offhand. But if I had to pick a place for "no later than": when IBM decided they were going to start running Linux on their mainframes, thousands of VMs to a machine |
23:45 | <&McMartin> | Also, if I want to be a dick about it |
23:45 | <&McMartin> | Linux, if not on the desktop per se, became a respectable consumer operating system in 2010 |
23:46 | <&McMartin> | You may have heard of that "Android" thing after all~ |
23:46 | <&Reiver> | (I confess, I am told time and again that No, Linux and Unix Really Are Different, but I have never been able to effectively internalise a quicksheet on What Made Them So Different beyond, uh, flavor & liscencing) |
23:46 | <&Reiver> | ... ha, yes, okay |
23:46 | <&McMartin> | Flavor and licensing is about the size of it yes |
23:46 | <&Reiver> | And then the Linux purists would possibly gripe "But it's not the same at allll" and then the snarkists replie "Yes, that's why it's consumer-grade at last" |
23:46 | <&McMartin> | But that also includes things like "which libraries you actually have access to" and that sort of thing |
23:46 | <&Reiver> | Ah, I see, okay |
23:46 | <&McMartin> | TCP/IP's universal dominance doesn't happen until the late 1990s! |
23:46 | <&McMartin> | That was a BSD thing. |
23:46 | | * Reiver blinks |
23:47 | <&McMartin> | X.25 baby |
23:47 | <&Reiver> | the fuck we were using before then, or were we... not |
23:47 | <&McMartin> | That's what ran AOL and progidy |
23:47 | <&McMartin> | *prodigy |
23:47 | <&McMartin> | And it wasn't alone, there's networking protocols out the ass |
23:47 | <&Reiver> | (Oh my, how AOL's rise and fall was truly meteoric) |
23:47 | <&McMartin> | Several varieties of what we now call "sockets" |
23:48 | <&McMartin> | UUCP bangpaths |
23:48 | <&McMartin> | all kinds of stuff that is mostly before my time |
23:48 | <&McMartin> | Though one of the Usenet posts I ended up relying on for one of my Atari ST posts... came from a bangpath, not an Internet address. |
23:48 | <&Reiver> | So it is unfair but not unhelpful to think of Unix as being like the various different Linux kernels, albeit with a more distinctively different ste of libraries and a radically different liscence, then? |
23:48 | <&McMartin> | Yeah. |
23:48 | <&McMartin> | And hell |
23:48 | <&McMartin> | If you're buying Linux support from IBM |
23:49 | <&McMartin> | Your day to day isn't meaningfully different, since it's "you give them money and you run their software and you have a support contract" |
23:49 | <&Reiver> | (Aside: Just how expensive, or whatever, *was* Unix? I knew that the Sun OS was ruinously Enterprise $$$, I know that Windows Server stuff ain't entirely cheap, and Linux frequently touts being free and open source but then real companies usually pay for a particular flavor, but I never had a feel for where Unix sat in the spectrum) |
23:50 | <&McMartin> | I'm too young to answer that question, and since I was at uni, the Unices I used were on donated hardware in the first place |
23:51 | <&McMartin> | If you're a certain kind of entity, I guess there's also this |
23:51 | <&Reiver> | aw hell |
23:51 | <&Reiver> | We need an *oldtimer* grognard? |
23:51 | <&McMartin> | There is a thing called The Single UNIX Specification; if you want to be strictly compliant you take your release and you get it certified and stuff and then you get a sticker |
23:51 | | * Reiver hms, goes asks in another channel |
23:51 | <&Reiver> | Oho? |
23:51 | <&McMartin> | Linux is Diffuse and can't meaningfully do that |
23:52 | <&Reiver> | right |
23:52 | <&McMartin> | And the Big Corporate Distros don't bother attempting it in the first place |
23:52 | <&McMartin> | So it never got it |
23:52 | <&McMartin> | In practice, It Is POSIX Compliant, Nobody Cares |
23:52 | <&McMartin> | But if you were for some reason contractually required to Have The Sticker On Whatever You Use, welp, no Linux for you until somebody changes the policy |
23:52 | <&McMartin> | Which clearly had happened by the mid-aughts, because Nobody Cares |
23:53 | <&McMartin> | Anyway, yeah, the era of commercial UNIX dominance was late-80s, early-90s. |
23:53 | <&McMartin> | https://en.wikipedia.org/wiki/Unix_wars |
23:55 | <&Reiver> | I remember the mid-aughts, working as a hardware monkey at a research facility |
23:56 | <&Reiver> | And they had a Big IT Dept Presentation about their impending shift to Linux-based servers |
23:57 | <&Reiver> | One of those things where the people talking about it were very excited, and comments of $team who would be thrilled (there'd been a slow proliferation of big chunky Tower PCs running Linux through some research departments over the years), though most folks didn't really comprehend what it would mean or take |
23:58 | <&Reiver> | Working now as a back-end IT fella, I now understand the answer is "This is going to take an enormous amount of work and works better for our long term strategic goals, but if we do it right none of you windows folks will notice or care" |
23:58 | <&McMartin> | Oh yeah |
23:58 | <&McMartin> | The graphics lab had a similar feeling |
23:58 | <&McMartin> | And that I can quantify |
23:58 | <&Reiver> | "Why the presentation, then?" "So you know what the fuck we'll be doing with our hair on fire for the next twelve months and be expected to nod, smile sweetly, and fuck off when we explain we're Busy today"~ |
23:59 | <&Reiver> | Aye? |
23:59 | <&McMartin> | "It's a heckin' SGI workstation, complete with Basically Unix On It, but it's commodity consumer hardware instead of Twenty Grand A Pop" |
23:59 | <&Reiver> | Right, exactly that |
23:59 | <&Reiver> | The various teams were running Compaq consumer PC towers, in fact |
23:59 | <&Reiver> | Instead of the little Corporate Desk Box |
23:59 | <&McMartin> | Yeah, that was probably an order of magnitude savings just on hardware alone -_- |
--- Log closed Tue Aug 17 00:00:01 2021 |