Tech

Set Mac wallpaper via CLI

Posted on

osascript -e ‘tell application "System Events" to set picture of (reference to current desktop) to "/Users/dsadmin/Desktop/nettools/.background_10134.jpg"’ or if you need variables osascript -e "tell application "System Events" to set picture of (reference to current desktop) to "$HOME/Desktop/nettools/.background_$swver.jpg"" escaping the quotes in the expression

Tech

Remove the last character from a bash variable

Posted on

The following method, removes the last character from a bash variable by using a regular expression that matches any character. VAR=${VAR%?} The functionality ${string%substring} deletes shortest match of $substring from the back of $string. The question mark ? matches zero or one of the previous regular expression. It is generally used for matching single characters. […]

Tech

Netmask Conversions

Posted on

If you have ever needed to know what a netmask looks like expressed in some other format this table of equivalents should help. It contains common IPv4 netmasks expressed in four different formats. Bitmask (Bits) Dotted Decimal Hexadecimal Binary /0 0.0.0.0 0x00000000 00000000 00000000 00000000 00000000 /1 128.0.0.0 0x80000000 10000000 00000000 00000000 00000000 /2 192.0.0.0 […]

Tech

Jamf Pro – Resetting the CA

Posted on

1) use jamfsoftware; (if we used different db name please use it instead of ‘jamfsoftware’) truncate table jss_server_url; truncate table signing_certificates; truncate table certificate_authority_issued; truncate table certificate_authority_revocation_list; truncate table certificate_authority_settings; 2) Restart MySQL and Tomcat 3) From the server open web browser and navigate to the following site: https://127.0.0.1:8443 4) Click continue when the certificate […]

Tech

Using Terminal At macOS Setup Assistant

Posted on

Recently I became aware that you can open Terminal (and Console) from the macOS Setup Assistant via keyboard shortcuts. When you are in Setup Assistant, you can open Terminal or Console by pressing: CTL + OPTION + CMD + T (for Terminal) CTL + OPTION + CMD + C (for Console) Terminal will then launch […]

Tech

How to compress and uncompress files and folders in the Terminal in macOS

Posted on

Since macOS is based on Unix there are a number of ways to compress files and folders within the filing system using Unix based application code, below are a few options using the Terminal or command line interface (cli). The default command line application interface in macOS is the Terminal and is stored in /Applications/Utilities. File and folder compression saves on […]

Tech

Config Profile-Normal user cannot login

Posted on

If you use a LoginWindow configuration profile make sure under Access the checkbox “Local-only users may log in” is checked. I unchecked this by accident and local user could no longer login only AD users and admin accounts.

Tech

Launchctl 2.0 Syntax

Posted on

Loading and Unloading Daemon/Agents In 10.9 and older, if you wanted to load launchagent the command would look like: launchctl load /Library/LaunchAgents/com.company.launchagent.plist And to unload it: launchctl unload /Library/LaunchAgents/com.company.launchagent.plist An assumption is made about how the launchagent is being loaded. For starters, it assumes the user loading the agent is the user in the shell environment. It might also make assumptions about whether […]

Tech

Open Directory fix org.openldap.slapd Throttling respawn

Posted on

To repair the Open Directory authdata database: $ sudo launchctl unload /System/Library/LaunchDaemons/org.openldap.slapd.plist Now start the database recovery using the command below that matches your OS version. $ sudo db_recover -h /var/db/openldap/authdata/ # Mac OS X 10.7 and up $ sudo db_recover -h /var/db/openldap/openldap-data/ # Mac OS X 10.6 Now slapd in tool mode outputs: $ […]

Tech

Speed up MacOS X file transferring over network

Posted on

We had an issue with a group of MacOS X clients on a particular VLAN that were experiencing painfully slow transfers (~100KB/s) to our Solaris fileservers running netatalk (AFP). The problem was solved by tweaking a kernel parameter on the client that made it “more compatible.” delayed_ack=0 responds after every packet (OFF) delayed_ack=1 always employs […]

Tech

Elise S1 Speedo Sender

Posted on

Lotus have changed the Speedo Sender used on the Elise S1. As it turns out its actually a Crank Sender from Vauxhall. Can be found for around £10 These are the references FAE 79205 Fuel Parts CS1445 Intermotor 19038 Kerr Nelson EPS102 Lemark LCS287 Lucas SEB1041 ALFA ROMEO 71739267 GENERAL MOTORS 12567712 24576398 6238158 6238186 […]