|
seriously I don't get wtf is going on with this Kerberos Auth problem switching between two accounts. New keytab is generated and spn assigned to link the new account to the serverbut it doesn't work, and the old keytab somehow still does even though the spn is no longer linked to that account??? if I run kinit on the new keytab it fails which maybe points to the password in the keytab being wrong, but if the password was wrong surely ktpass would have failed to generate? or does ktpass not actually validate it? if it's a bad password then I will be so pissed off with our support team who are supposed to manage accounts and are the ones that provided it to the domain admins to generate the keytab
|
# ? Jun 18, 2022 10:46 |
|
|
# ? Apr 28, 2024 04:07 |
|
Powerful Two-Hander posted:BORN TO AUTHENTICATE
|
# ? Jun 18, 2022 14:58 |
|
I dunno much about kerberos except it's a pile of poo poo on good days and I've had a hell of a problem getting delegated credentials to work on a custom python-based web service until I gave up and used a different mechanism. But all of your issues kinda points to something being stale. Can you try authenticating to a different kdc?
|
# ? Jun 18, 2022 15:59 |
|
it works fine in windows for the most part. when people complain it's usually cause they're running into a security constraint like delegation or token relaying. or if they're doing Linux poo poo
|
# ? Jun 18, 2022 17:07 |
|
re: passwords I use managed accounts as much as possible because service accounts with human managed credentials are a terrible idea.
|
# ? Jun 18, 2022 17:10 |
|
Shaggar posted:re: passwords I use managed accounts as much as possible because service accounts with human managed credentials are a terrible idea. ugh I know but when I quizzed our server engineering guys on this they went "yeah that's a good idea we'll look at it" and that was like 6 months ago
|
# ? Jun 18, 2022 17:29 |
|
sb hermit posted:I dunno much about kerberos except it's a pile of poo poo on good days and I've had a hell of a problem getting delegated credentials to work on a custom python-based web service until I gave up and used a different mechanism. so there's one funny thing: the krb5.ini config had a non existent server for the domain, I updated that this morning to use a server that actually exists and expected the existing account/keytab to then fail out because it must have just been caching a ticket (for like, 3 years), but no, old account that the spn was removed from still works
|
# ? Jun 18, 2022 17:31 |
|
Powerful Two-Hander posted:ugh I know but when I quizzed our server engineering guys on this they went "yeah that's a good idea we'll look at it" and that was like 6 months ago it's like 5 minutes of setup for the domain and then 5 minutes per account. the only problem is some applications' credential uis don't support it. otherwise it's better in every way than using user accounts.
|
# ? Jun 18, 2022 19:10 |
|
Shaggar posted:it works fine in windows for the most part. when people complain it's usually cause they're running into a security constraint like delegation or token relaying. or if they're doing Linux poo poo it's the absolute tits in linux these days, assuming you're in a linux-first environment. linux speaking to FreeIPA, Samba, or even directly with ldap-of-choice/(mit-krb5 or heimdall) makes for happy fun times linux speaking to AD for anything but the most absolutely simple of use cases, and you're gonna have a bad time
|
# ? Jun 18, 2022 23:09 |
|
can I ask a question about JSON I'm trying to hold all my crime data (read only stuff) in a JSON file, and I am unsure of how to have the layout. my goal would be to access it like code:
code:
am I heading in the right direction?
|
# ? Jun 18, 2022 23:30 |
|
assuming you want to be able to map one spiel to many crimes, and buttonid is how you intend to join the two, sure. that said, as spiels grows, it will become increasingly inefficient, and you should probably pull your buttonid up to sit directly inside spiels[] with something likecode:
edit: i am not a frontent person and just realized buttonid is unikely an id. if you want to map crimes and spiels, you either need to put the spiel inside the crime, or provide an id to map between the two. outhole surfer fucked around with this message at 23:42 on Jun 18, 2022 |
# ? Jun 18, 2022 23:39 |
|
no I just separated them because I want to be able to view and edit the crime data without the spiel getting in the way I have realised I was meant to have everything inside the one set of {} though, so I've changed that. the tutorials do quite a good job of showing the same thing over and over, but I had to do a lot of searches to find out how to actually add a json file to my project. which now that I look at it was kind of obvious but still lol nudgenudgetilt posted:if you want to map crimes and spiels, you either need to put the spiel inside the crime, or provide an id to map between the two. I should probably code a bit better, my buttonid is something like "loit" that is specific to each crime, and so once I have that I can access the relevant spiel with that. I hope
|
# ? Jun 18, 2022 23:49 |
|
and wth chrome is complaining about my : after "crimes" and if I remove them it stops complaining but now vscode is sad there is surprisingly little tutorial on the internet that helps you work out how to actually open a JSON file in your code and reference it. down the stack overflow rabbit hole I go
|
# ? Jun 19, 2022 00:00 |
|
Instead of making spiels an array, which means you'll need to scan the entire array to find the right spiel, you can just make it an object with keys directly:code:
Then you can just look up spiels[crime.buttonId] to get the text.
|
# ? Jun 19, 2022 00:03 |
|
Jabor posted:Instead of making spiels an array, which means you'll need to scan the entire array to find the right spiel, you can just make it an object with keys directly: oh.. that makes a lot of sense why tho is chrome spitting the dummy about that first colon? some online json validator says my file is fine.
|
# ? Jun 19, 2022 00:17 |
|
echinopsis posted:there is surprisingly little tutorial on the internet that helps you work out how to actually open a JSON file in your code and reference it. down the stack overflow rabbit hole I go you're trying to think about several relatively simple operations (open file, read it into a string, deserialize that string into an object) as one complex operation. instead decompose your problems when searching for them. search for how to open a file in your language of choice, then how to read that file into a string, and finally how to parse or deserialize that string into an object.
|
# ? Jun 19, 2022 00:18 |
|
nudgenudgetilt posted:you're trying to think about several relatively simple operations (open file, read it into a string, deserialize that string into an object) as one complex operation. you're probably right, although I would have thought it was a common enough set of problems that tutorials addressing one would at least mention the others. thanks for the advice
|
# ? Jun 19, 2022 00:33 |
|
echinopsis posted:you're probably right, although I would have thought it was a common enough set of problems that tutorials addressing one would at least mention the others. maybe, but in general you'll get better quality results looking for the individual things even if the others may be covered in the same article
|
# ? Jun 19, 2022 01:10 |
|
echinopsis posted:you're probably right, although I would have thought it was a common enough set of problems that tutorials addressing one would at least mention the others. part of what you're bumping into is that by the time you need to parse a json file, you're generally expected to have already tackled the concept of opening/working with files, and parsing json strings (from hardcoded vars or apis) into objects, so nobody explicitly calls out "here is how you go from file to object"
|
# ? Jun 19, 2022 01:49 |
|
nudgenudgetilt posted:part of what you're bumping into is that by the time you need to parse a json file, you're generally expected to have already tackled the concept of opening/working with files, and parsing json strings (from hardcoded vars or apis) into objects, so nobody explicitly calls out "here is how you go from file to object" ah yes the constant pitfalls from self teaching lol
|
# ? Jun 19, 2022 03:36 |
|
echinopsis posted:oh.. that makes a lot of sense what's the actual json causing that error?
|
# ? Jun 19, 2022 03:45 |
|
cool av posted:what's the actual json causing that error? oh I had copied someone elses example which used <-script type="text/javascript"-> in the html, when I changed this to "json" it fixed it. idk if it's meant to be json but it doesn't complain anymore e: but I am thinking about giving up on this approach for now and just using an external data.js file instead. every solution I find assumes I'm node.js or jQuery, and my patience is wearing thin. and putting the data in an external js file is the same but different anyway, it's just a way to get it out of the main.js file echinopsis fucked around with this message at 03:56 on Jun 19, 2022 |
# ? Jun 19, 2022 03:49 |
|
what's the correct way in java to tell windows to not go to sleep or hibernate? i'm running a really long term job on my personal desktop so i don't want to disable hibernate entirely- only when my job is running
|
# ? Jun 19, 2022 23:00 |
|
PIZZA.BAT posted:what's the correct way in java to tell windows to not go to sleep or hibernate? i'm running a really long term job on my personal desktop so i don't want to disable hibernate entirely- only when my job is running I dont have a way in Java. I use Don't Sleep for this purpose, works well.
|
# ? Jun 20, 2022 00:45 |
|
PIZZA.BAT posted:what's the correct way in java to tell windows to not go to sleep or hibernate? i'm running a really long term job on my personal desktop so i don't want to disable hibernate entirely- only when my job is running on macos there’s a built in command for this called caffeinate. maybe searching for a windows equivalent would turn up something?
|
# ? Jun 20, 2022 01:16 |
|
get a mouse jiggler dongle that Runs Java
|
# ? Jun 20, 2022 01:34 |
|
PIZZA.BAT posted:what's the correct way in java to tell windows to not go to sleep or hibernate? i'm running a really long term job on my personal desktop so i don't want to disable hibernate entirely- only when my job is running the kernel api call you want is SetThreadExecutionState https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate?redirectedfrom=MSDN how you call that from java idk. set ES_CONTINUOUS on a native thread and as long as that thread stays alive (and you dont change the exec state) it should keep the system awake. if you're lazy you could probably accomplish this by modifying something like this: https://gist.github.com/natesubra/e8ed71a1ed9521178a47c6c33c57db2b Change it to something like: launch ur java process SetThreadExecutionState ES_CONTINUOUS while(CheckIfJavaProcessIsRunning) { sleep 500 } effectively the script process should keep the computer awake and then once the java process ends the script process should terminate itself, allowing the computer to sleep. or just run that script as is and then run ur java thing and come back later.
|
# ? Jun 20, 2022 01:35 |
|
Shaggar posted:the kernel api call you want is SetThreadExecutionState https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate?redirectedfrom=MSDN another, possibly simpler, solution to his problem might be to have his java program launched by a batch file or ps script that calls powercfg.exe. use /list to get the GUID for your high performance or "no sleep" plan as well as your normal plan. call with activate with the high performance plan, run the java command, then have the command to set your normal power plan after it.
|
# ? Jun 20, 2022 01:44 |
|
Or write a JNI package that utilizes the microsoft API
|
# ? Jun 20, 2022 09:42 |
|
Powerful Two-Hander posted:BORN TO AUTHENTICATE
|
# ? Jun 20, 2022 10:39 |
|
hobbesmaster posted:another, possibly simpler, solution to his problem might be to have his java program launched by a batch file or ps script that calls powercfg.exe. use /list to get the GUID for your high performance or "no sleep" plan as well as your normal plan. call with activate with the high performance plan, run the java command, then have the command to set your normal power plan after it. Not running a .bat to call it specifically but I had a laptop once that would sleep from inactivity no matter what, even if on high performance and no sleep configured. Don't sleep fixed this, though reformatting that laptop also fxed it, it was some policy or setting from Asus.
|
# ? Jun 20, 2022 14:06 |
|
sb hermit posted:Or write a JNI package that utilizes the microsoft API you don’t need to gently caress with jni these days unless you really want to. just use jna or jnr, they’re along the lines of python ctypes or w/e.
|
# ? Jun 21, 2022 20:13 |
|
is there a way to set a function as a @property on an object using setattr()? im getting the object from elsewhere so i cant change its definition, but i want to put an attribute on it that works as a @propertyPython code:
|
# ? Jun 22, 2022 13:09 |
|
Carthag Tuek posted:is there a way to set a function as a @property on an object using setattr()? im getting the object from elsewhere so i cant change its definition, but i want to put an attribute on it that works as a @property
|
# ? Jun 22, 2022 13:29 |
|
you probably have a good reason, but why can't you do this?code:
|
# ? Jun 22, 2022 13:40 |
|
Corla Plankun posted:you probably have a good reason, but why can't you do this? presumably they want to set it at runtime
|
# ? Jun 22, 2022 14:22 |
|
yea, its a thing i get from 3rd party code at runtime, so im piggybacking on it lolmystes posted:If you change setattr(o, 'test', property(fget=test_getter)) to setattr(TestObject, 'test', property(fget=test_getter)) to add it to the class rather than the object it will work. If it's not acceptable to add it to the class you might have to do something else. doy of course i should set it on the clas, not the instance. so this works Python code:
|
# ? Jun 22, 2022 15:33 |
|
Pipenv is such a gaaaarbage Why isn't virtualenv / virtualenvwrapper just the standard now and forever
|
# ? Jun 22, 2022 16:29 |
|
I use pyenv for python versions and poetry for packages with virtualenv creation, works quite well for me
|
# ? Jun 22, 2022 16:49 |
|
|
# ? Apr 28, 2024 04:07 |
|
I dont use python and I wish I could say that it works well for me but I regularly have to use something written in python and I get exposed to all that python environment installation clown show
|
# ? Jun 22, 2022 16:53 |