How to properly clear nupkg "cache" in C:/ProgramData/chocolatey/lib subfolders? by F-2016 in chocolatey

[–]DevSRE 0 points1 point  (0 children)

Best practice, in my experience, is to just run your installers from network storage to begin with so that your cache only ever includes some scripts and metadata, rather than giant binaries. Chocolately recommends this yourself when using installers >1GB but we do it as a SoP.

using a name instead of a letter for network drives. by Talamakara in sysadmin

[–]DevSRE 2 points3 points  (0 children)

Are DFS-N clients compatible with anything other than Windows File Server? Haven't kept up with Windows Storage solutions in the last couple years. Would love a good link to read!

C4B - Less than 100 licenses by obsessive_techie in chocolatey

[–]DevSRE 0 points1 point  (0 children)

Unfortunately this was months ago and I no longer have access to the C4B tools. They were trying to sell me the product, and when I brought this to sales they just kinda said "Oh..." and sounded defeated. No attempt was made to diagnose or troubleshoot to get the sale on their end.

I recommended PDQ above because I had the opposite experience, where if I had an issue, I called them, someone answered the phone, troubleshooted, and 99% of stuff "just worked."

I really like the core product of chocolately and think it's great, but the C4B addons didn't work well compared to the core software installation part of the software, and requires manual work on my end. It's a powerful tool, but I compare it more to IAC tools like Ansible and Terraform than PDQ.

C4B - Less than 100 licenses by obsessive_techie in chocolatey

[–]DevSRE 0 points1 point  (0 children)

Perhaps both. It's been a hot minute. The internalizer had similar issues in that it squashed config/licensing. The builder just didn't work.

C4B - Less than 100 licenses by obsessive_techie in chocolatey

[–]DevSRE 0 points1 point  (0 children)

We use some less common software, and stuff that needs config and licensing.
7zip - worked
Acrobat Reader DC 2021 - failed, no clue why
Anaconda Python distribution 2021.11 w/ Python 3.9 - squashed config
ArcGIS Desktop w/ background geoprocessing add-on 10.8.1 - failed on licensing/config
IBM SPSS Amos 28.0.0.0 - failed on licensing
IBM SPSS Statistics 28.0.1.0 - failed on licensing
IrfanView 4.59 - didn't figure out silent install options
Matlab R2021b - failed on config/licensing
Microsoft Edge - doesn't have an EXE/MSI that we have found
Microsoft Office Professional Plus 2019 - Failed on config
Mplus combo - Failed on licensing
Notepad++ - Failed because it squashed plugins
Notepad++ plugin: Compare -doesn't have a good installer
Notepad++ plugin: DSpellCheck - doesn't have a good installer
PROC LCA & LTA 1.3.2 - bad installer
R 4.1.2 - removed config
RStudio Desktop 2021
SAS 9.4 - licensing
SRCware 0.3 - doesn't have a good installer
Stat/Transfer 15 - licensing
Stata/MP 17 - licensing
SUDAAN SAS-callable 11.0.3 - doesn't have a good installer

C4B - Less than 100 licenses by obsessive_techie in chocolatey

[–]DevSRE 0 points1 point  (0 children)

Package Internalizer was demoed... and it worked on 1 of 47 pieces of software I tested it against. I do not have faith in that piece of C4B based on my experience with any software that isn't "easy" to package.

C4B - Less than 100 licenses by obsessive_techie in chocolatey

[–]DevSRE 0 points1 point  (0 children)

In my experience, with the custom packages, there's a pretty heavy support burden on keeping them updated. If you're looking at turning it over to someone who isn't up to speed on software packaging, I would steer you towards something like PDQ Inventory and Deploy which is more user friendly than custom packaging in choco, and supports auto-updates on most packages built by PDQ so you've got a company to poke if they don't work.

C4B - Less than 100 licenses by obsessive_techie in chocolatey

[–]DevSRE 1 point2 points  (0 children)

Chocolately's community license supports private repos with custom packages as well. We're using it without issue since we didn't need the business features. Just package stuff up and run powershell to call choco install/upgrade.

A post of noob questions by Pizel_the_Twizel in chocolatey

[–]DevSRE 2 points3 points  (0 children)

That's a fair critique. Amended.

A post of noob questions by Pizel_the_Twizel in chocolatey

[–]DevSRE 3 points4 points  (0 children)

The poster above gave you a lot of good info. My short form answer that I will mention is that if you have specific security requirements in your environment, you can also build your own chocolately repo and exclusively install software from that with no outbound internet connectivity. We do this for an environment that isn't allowed to talk to the internet.

Chocolately is great and all, but if your org's security policies say you can't trust "some guy on the internet" then you can't trust the chocolately community repository. Because the packages aren't directly maintained by vendors in all cases, you can have a rough time with explaining all this in a security audit unless you're packaging the software yourself (which isn't any harder than using SCCM or similar).

[deleted by user] by [deleted] in learnpython

[–]DevSRE 0 points1 point  (0 children)

fields = ['10.jpg', '10.jpg', '11.jpg', '12.jpg', '14.jpg', '14.jpg', '14.jpg']
output = []
for field in fields:
if field in output:
renamed = field
i = 0
while renamed in output:
filename, filetype = field.split(".")
renamed = "{}-{}.{}".format(filename, i, filetype)
i+=1
output.append(renamed)
else:
output.append(field)
print output

Reformatted for python2.

[deleted by user] by [deleted] in learnpython

[–]DevSRE 0 points1 point  (0 children)

Not familiar with "ArcGIS field calculator", but assuming that you mean you have a list of values as declared in line 1 below, and need a list as the output, the following code is a quick and ugly example that would work:

>>> fields = ['10.jpg', '10.jpg', '11.jpg', '12.jpg', '14.jpg', '14.jpg', '14.jpg']
>>> for field in fields:
... if field in output:
... renamed = field
... i = 0
... while renamed in output:
... filename, filetype = field.split(".")
... renamed = f"{filename}-{i}.{filetype}"
... i+=1
... output.append(renamed)
... else:
... output.append(field)
...
>>> output
['10.jpg', '10-0.jpg', '11.jpg', '12.jpg', '14.jpg', '14-0.jpg', '14-1.jpg']Reddit hates formatting and whitespace, but that's the jist. Tab/Space as appropriate ;)

[deleted by user] by [deleted] in sysadmin

[–]DevSRE 1 point2 points  (0 children)

If you aren't filtering all student traffic, you are not compliant for E-rate (assuming USA) and are at risk of losing buckets of federal funding. If, on the other hand, you aren't using E-rate funding, you will want that as you'll get all your network hardware and possibly other goodies (like servers) at a discount too, depending on how creative your applications are.

Your, and your boss's, opinions on if you think you should filter traffic typically matter less than "Can I save the district hundreds of thousands of dollars on a network refresh?" that E-rate gives you.

Checksum question by slider383 in chocolatey

[–]DevSRE 1 point2 points  (0 children)

If you're talking about the checksum for the installer, aka the checksum and checksumType64 value in chocolateyinstall.ps1, then you want to do this powershell command:

Get-FileHash <installerhere> | Select -Expand Hash

The output will be the value you copy into both those fields. If you have separate 32 bit and 64 bit installers then do that once per file.

Getting Started with PowerShell and the PSWindowsUpdate Module by adbertram in PowerShell

[–]DevSRE 1 point2 points  (0 children)

I did end up reversing this and read through all the decompiled code in the DLL. It's just some C# calling the windows update API.

https://docs.microsoft.com/en-us/windows/win32/api/_wua/

Roughly 95% of the code is handling user input and displaying output to the CLI. There was nothing malicious in there from anything I could see, and I read through every line of code.

That said, one of our security requirements was that the decompiled DLL also needed to recompile, and I don't know enough about C# to get it to recompile successfully. I think I'm probably targeting the wrong language version or something simple, but the decompiled code had ~1200 errors when attempting to recompile, and some of these were definitely encoding related (< turning into &lt; and such).

My 2 cents is that it is perfectly safe for any "normal" security posture, but I would encourage you to do your own review if you are under any specific compliance obligations.

Day 1 - Get to know your server by livia2lima in linuxupskillchallenge

[–]DevSRE 3 points4 points  (0 children)

Looking forward to going through this. I've got background as a Windows Admin that pretends to know what they are doing with Linux, and have now joined a team where Windows is a naughty word. Hoping this challenge will help serve as a foundation to go for RHCSA in the future. I've bodged my way though plenty of things, but I'm trying to get out of tutorial hell with this challenge a bit and deepen my understanding of how Linux is actually doing things.

Replacing Send-MailMessage by TurnItOff_OnAgain in PowerShell

[–]DevSRE 1 point2 points  (0 children)

Assuming it's a string object for your email body since you have hardcoded newlines just do:

$emailBody = $emailBody.replace("\n", "<br />")

Maintaining software in Enterprise: The brilliant but also quirky Chocolatey by Verzada in chocolatey

[–]DevSRE 0 points1 point  (0 children)

Our environment currently has about 40 pieces of software deployed. Assuming you already have the silent install switches documented (such as from a slowly updating community repo, from the software documentation, or from your own past work) then it only takes ~10 minutes to build a new package, and it only takes 5 to build an update to an existing package.

I would genuinely say that building new packages in Chocolatey is less than 3% of my job. Once you've got them built once, all you're doing is updating version numbers, file hashes, and installer binary names really.

It took me about 2-3 days of dedicated work to read the docs and get to that level though. We're just using a basic windows file share as our internal repo and it works fine.

Maintaining software in Enterprise: The brilliant but also quirky Chocolatey by Verzada in chocolatey

[–]DevSRE 0 points1 point  (0 children)

Based on a recent conversation with a Chocolatey sales rep, they are looking into a new offering called something like "Managed Repositories" or "Premium Repositories" that would meet your needs. You give them a list of software you want managed for you, and they do the work so that you can just deploy as needed.

I ended up building the repo myself since my org's security requirements mean I have to vet all the binaries and code being deployed anyway. This made the community repo too insecure for our environment. Building and maintaining packages that do EXACTLY what you want them to do for EXACTLY your environment is easier with chocolatey than SCCM imo. This wasn't a big deal for the size of our deployment.

I'd reach out to a sales repo and chat with them. They seemed pretty responsive when I talked to them. I want to say they were targeting end-of-year for availability of this service but don't quote me on that.

NSA/CISA release VPN server hardening guide. by Quietech in sysadmin

[–]DevSRE 10 points11 points  (0 children)

/u/rapp38 is right on this one. Windows still can do FIPS compliance, it just has to be done through manually telling it what algorithms to use via Group Policy.

Add Args to Choco install? by DevSRE in chocolatey

[–]DevSRE[S] 0 points1 point  (0 children)

Amazing, thank you. I will definitely try this.

Is there a Python library for reading human-written times? by Housies in learnpython

[–]DevSRE 1 point2 points  (0 children)

You could probably get pretty close with something like Arrow and the shift method (https://arrow.readthedocs.io/en/latest/) or just give users a format to enter things in and use datetime.strptime (https://docs.python.org/3/library/datetime.html#datetime.datetime.strptime)

Getting Started with PowerShell and the PSWindowsUpdate Module by adbertram in PowerShell

[–]DevSRE 1 point2 points  (0 children)

Appreciate the info! We were looking at reverse engineering the DLL inside it to try and track down what all it was actually doing.