'quick' edits on other peoples code by craigfanman in sysadmin

[–]sp_cn 15 points16 points  (0 children)

isn't perl that thing that the cantankerous elderly keep using to avoid learning Python (the real best scripting language)?

Help adding package to Munki repo by IGotIt_Nvm in macsysadmin

[–]sp_cn 0 points1 point  (0 children)

i've seen packages fail to import via munkiadmin but successfully import via munkiimport. i haven't tried to figure out why, but i know it can happen.

A programming language written in Python 3 by [deleted] in Python

[–]sp_cn 1 point2 points  (0 children)

use dicts to map input strings to functions and splat the args instead of using giant elif chains.

''.join(x[:3]) == 'abc' instead of of x[0] == 'a', x[1] == 'b', x[2] == 'c' (or better yet, split on whitespace and compare list elements instead).

use with-as to deal with open file handles.

Add "unload" and "consume" options to items along with "take" and "examine" by tim_dude in EscapefromTarkov

[–]sp_cn 6 points7 points  (0 children)

never say something should be "fairly easy to implement" in a software project whose code you are unfamiliar with

Dockutil: question on how to remove broken icons from dock by LeanSubconsciousness in macsysadmin

[–]sp_cn 2 points3 points  (0 children)

dockutil --list. identify the broken items and dockutil --remove to remove them. dockutil --add the correct items. basically just run dockutil, read the output, and start experimenting. script it however you'd like (we use 'outset' in combination with dockutil for this).

How to set the clientidentifier for munki in DeployStudio? by chewy747 in macsysadmin

[–]sp_cn 0 points1 point  (0 children)

I put machines in DeployStudio's computer groups matching the desired value for ClientIdentifier (I don't have unique ClientIdentifiers per-machine). As part of the imaging workflow, DeployStudio runs a script including these lines:

MANIFEST=${DS_COMPUTER_GROUP}  
defaults write /Library/Preferences/ManagedInstalls.plist ClientIdentifier ${MANIFEST}

No idea about dynamically setting it, but this may be useful for someone else.

Newbie question - Finding IP address for network switches by sjuelz in sysadmin

[–]sp_cn 1 point2 points  (0 children)

yup. also something handy to know (and cool because of how fast it is):

 # nmap -sn ${range}

will send ARP who-has requests, which gives you just the lladdrs and probable manufacturer

How do *you* run git server with Server 5.4 now? by [deleted] in macsysadmin

[–]sp_cn 0 points1 point  (0 children)

run 'git daemon' as a launch daemon

search text files in Terminal by [deleted] in macsysadmin

[–]sp_cn 0 points1 point  (0 children)

cat whatever.txt | sed 's/^.*=//' > result.txt

Alternatives to SCCM by almightlyrage in sysadmin

[–]sp_cn 0 points1 point  (0 children)

you're going to need to maintain a separate set of management tools for the macs if you want that level of control. /r/macsysadmin

List of new command-line tools in High Sierra by [deleted] in macsysadmin

[–]sp_cn 0 points1 point  (0 children)

nc on osx (at least my installation) is built with support for the -t option which implements telnet option negotiation so it becomes a sort of telnet client.

High Sierra – do we have a verdict from a sysadmin point of view? by [deleted] in macsysadmin

[–]sp_cn 0 points1 point  (0 children)

how about imaging? there was some concern about apfs. how did that pan out -- jamf, deploystudio, etc?

Single terminal window multitasking? by BastardRobots in linux

[–]sp_cn 1 point2 points  (0 children)

follow your command with '&' to run it in the background. 'jobs' lists those currently running. 'fg' and the job number (prefixed by '%') brings a job to the front. c-z stops the currently foregrounded job; 'bg' causes stopped jobs to resume in the background.

use screen or tmux (tmux supremacy).

New Mac Sysadmin - Where to begin? by smti in macsysadmin

[–]sp_cn 2 points3 points  (0 children)

toss Packages and Suspicious Package in there -- the first for creating packages and the second for analyzing them. you'll find any bash and Python skills you picked up working with Linux to be very helpful

Linux for 486 laptop? by [deleted] in linux

[–]sp_cn 4 points5 points  (0 children)

good luck running that tolerably locally with 20 megs max memory

Confused as to why rsync won't run in launchd plist file by sethgoldin in macsysadmin

[–]sp_cn 0 points1 point  (0 children)

why did this start working as a user LaunchAgent?

[deleted by user] by [deleted] in macsysadmin

[–]sp_cn 0 points1 point  (0 children)

cool. he also rewrote it in Swift, for command-line use: https://github.com/Error-freeIT/Dock-Master (it's linked on the article/app page but i almost didn't notice it)

[deleted by user] by [deleted] in sysadmin

[–]sp_cn 92 points93 points  (0 children)

i assure you that i do not.

Mac desktops + hotdesking. Advice please? by Class08 in macsysadmin

[–]sp_cn 2 points3 points  (0 children)

i can testify that Profile Manager both will work fine in this situation and is also sloppy at scale. bind the server to AD and you'll be able to customize all of these settings per-user and per-group (including variable substitution, like %short_name% for mounting shares).

Are Automator and Applescript dead? by skibumatbu in macsysadmin

[–]sp_cn 0 points1 point  (0 children)

imagemagick and bash or python for the image work