krypted.com

Tiny Deathstars of Foulness

The msiexec command can be used to run an installer on Windows in a zero touch fashion. To do so, run the following command: msiexec /i "python-2.7.14.amd64.msi" /passive TARGETDIR="C:\python"

April 22nd, 2018

Posted In: Windows Server

Tags: , ,

Synology provides SSH access, which allows you to do a number of things you can’t do with the GUI. To enable SSH, simply log in on the Synology and open Control Panel. From the Control Panel, scroll down to “Terminal & SNMP” in the sidebar and check the box for “Enable SSH service” and then click Apply.


The device will then have SSH enabled. Open Terminal on your Mac or Windows device and let’s SSH into the root account of the IP address, done as follows (where 192.168.50.5 is the IP address of your Synology):

ssh root@192.168.50.5

When prompted, enter the same admin password you normally use. You’ll then be at a command prompt in the device, which should look like this:

diskstation>

Now, you can cd around, use ls to view folder contents. Terminal substitutions like !$ and !! won’t work, but you can do simple tasks like restart services using the synoservice command:

/usr/syno/sbin/synoservice –restart <servicename>

April 16th, 2018

Posted In: Synology

Tags: , ,

A Synology can act as a local file server that is used to share a folder from a cloud account. You can use accounts with from Backblaze, Google Drive, Amazon, Alibaba, Dropbox, Azure, and others. This means you can use a Synology to provide LAN access to cloud solutions. Before you do, make sure you understand that if changes are made in the cloud and on a client computer at the same time, that you will end up not knowing which is right and so file-locking issues will come up. It’s best to use this strategy for home environments or come up with another mechanism for locking files. 

If you choose to use the sync option, open Package Center and search for Cloud Sync.

Click Install to install the package.

Once installed, choose the cloud you’d like to sync to your local network.

For this example, we’ll use Google Drive. Click on that option and then  when prompted, select the account to use (if you have multiple accounts you access).
 
Once you’ve selected an account, you need to give an entitlement to the Synology to sync with that api.

When prompted, click Agree.
 
Next, configure how the data will be stored on the Synology. Do so by providing a name to the connection and choosing a path on your local storage. 
 

You can also create a folder on the Synology to then share. We’ll do so here and then click OK.

Then select .which folder on your cloud volume (in this case, my Google Drive) that you want to sync and click Select. 

Select when the sync will run. In this example, every hour.

Click OK and then Next. You’ll be shown an overview of the options you selected. Click Apply.
 
And then the first sync will start.

While the sync is running, let’s click Settings and review the options for throttling speeds (so as not to destroy slower WAN links).

Click History to see logs. And viola, you now have a local copy of cloud accounts!

April 15th, 2018

Posted In: Synology

Tags: , , ,

Carbonite is a great tool for backing up Macs and Windows devices. To install Carbonite, download it from www.carbonite.com. Once downloaded, copy the app to the /Applications directory and open the app. 

The Carbonite app will then install the components required to support the backup operations and index the drive.

Next, you’ll see some basic folders that will be backed up. Check the box for those you want to add to the backup (or do this later) and click the Install button.
  
Click Open Carbonite.

Notice that the backup has begun! The only really customer-installable action is to select the directories to be backed up, which is done using the left-hand sidebar. 

And that’s it. There aren’t a lot of other options in the GUI. You can access more options at /Library/Preferences/com.carbonite.carbonite.plist. 

April 12th, 2018

Posted In: Mac OS X

Tags: , ,

The DNS service in macOS Server was simple to setup and manage. It’s a bit more manual in macOS without macOS Server. The underlying service that provides DNS is Bind. Bind will require a compiler to install, so first make sure you have the Xcode command line tools installed. To download Bind, go to ISC at https://www.isc.org/downloads/. From there, copy the installer locally and extract the tar file. Once that’s extracted, run the configure from within the extracted directory:

./configure --enable-symtable=none --infodir="/usr/share/info" --sysconfdir="/etc" --localstatedir="/var" --enable-atomic="no" --with-gssapi=yes --with-libxml2=no

Next, run make:

make

Then run make install:

make install

Now download a LaunchDaemon plist (I just stole this from the org.isc.named.plist on a macOS Server, which can be found at /Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons/org.isc.named.plist or downloaded using that link). The permissions for a custom LaunchDaemon need to be set appropriately:

chmod root:wheel /Library/LaunchDaemons/org.isc.named.plist

Then start it up and test it!

launchctl load -w /Library/LaunchDaemons/org.isc.named.plist

Now you can manage the server as we described at http://krypted.com/mac-os-x-server/export-dns-records-macos-server/.

April 11th, 2018

Posted In: Mac OS X, Mac OS X Server

Tags: , , , ,

Backblaze is a great cloud and on-prem backup tool for Mac and Windows. You can download Backblaze at 
https://secure.backblaze.com/download.htm. Once downloaded, extract the DMG and open the Backblaze Installer. 

At the Installer screen, enter your existing credentials or create a new account and click Install Now.

The drive will then be analyzed for backup.

By default, once the analysis is complete, the computer will immediately start backing up to the Backblaze cloud. Let’s click on the Settings button to configure how the Backblaze app will work.

This opens the Backblaze System Preference pane. At the Settings tab, you’ll see a list of drives to back up and an option to set when to receive warnings when the computer hasn’t completed a backup recently.

By default, performance is throttled so as not to cause your computer to run poorly. Click on the Performance tab. Here, you can disable that option, 

By default, backups run continuously, as files are altered. You can use the schedule screen to move backups to a specific time (e.g. at 1am every night). I personally like having continuous backups if you have enough bandwidth to account for them. 

By default, the whole system is not going to get backed up. Click Exclusions and you can see what will be skipped and disable some of the skips.

By default, backups are encrypted using public keys. I inherently trust the people at Backblaze. But I still use an encryption key to add an extra layer of security to my backups.

To set that, click on the Security tab.

At the Security screen, click on Enter Your Private Encryption Key.

Once you’ve got a good backup policy set. Click on the Reports screen to see what’s getting backed up!

April 10th, 2018

Posted In: Mac OS X, Mac Security

Tags: , , ,

The colrm command is a simple little command that removes columns from standard input before displaying them on the screen (or piping the text into another file). To use, simply cat a file and then pipe it to colrm followed by the start and then stop in $1 and $2. For example, the following would only list the first column of a text file called testfile:

cat testfile | colrm 2

Not providing a second column in the above command caused only the first column to be displayed to the screen. You could pipe all but the second and third columns of a file to another file called testfile2 using the following:

cat testfile | colrm 2 3 > testfile2

April 9th, 2018

Posted In: bash

Tags: , ,

Quick little script to read the length of a string:

#!/bin/bash
echo "Enter some text"
read mytext
length=${#mytext}
echo $length

April 9th, 2018

Posted In: Mac OS X, Mac OS X Server, Programming

Tags: , ,

It’s not likely that your Synology is going to get infected with a virus of some kind. It’s also not likely that, if you’re switching to Synology from a macOS Server, that most of your clients will get infected or be using infected files. But you probably have that one Windows accounting machine in the back of the office. So you should scan your Synology routinely. To do so, Synology provides a clamav bundle, much like what I usually told people to use on macOS file servers.

To install antivirus on your Synology, open Package Center and search for antivirus. Click on Antivirus Essential and then click on Install.  

Once installed, open Antivirus Essential from the Main Menu. From here, you can perform a Full Scan, a Custom Scan (which allows you to select the shared folders to scan), or perform a System Scan (which scans everything else). To automate scans, click Scheduled Scan. 

At the Scheduled Scan screen, click Create. 

At the Schedule screen, choose the type of scan (the same options as when run manually) and when the scan should run. I definitely recommend daily scans. Then, click on OK and check the box for Enable. 

Click on Settings. Here, you can define what happens when an infected file is found (Quarantine is usually the best option as you can then click on Quarantine in the sidebar routinely to check on what files might have been moved). Whitelist allows you to define exclusions. Good files to exclude are Quickbooks files, and other files that aren’t very friendly to antivirus scanning, as they’re open a lot. And use the Update option to have the virus definitions updated before every scan. 

If you ever want to check that the definitions are indeed updated, click on Update in the sidebar. And that’s it, you’re now automatically scanning for viruses on the schedule you defined. I recommend setting a reminder to check on it every now and then. At first maybe weekly and later maybe monthly, depending on how many quarantined files are found when you check in. Just make sure the defs are up-to-date and sift through the logs every now and then and you should be good!

April 9th, 2018

Posted In: Small Business, Synology

Tags: , , , ,

You can backup a Synology in a number of ways. Even if you have a local backup, you should have a backup offsite. Here, we’ll walk through backing up a Synology using Acronis True Image. Before doing so, it’s worth noting that the only things backed up this way are the ones that are by default accessible through an app, and that you’ll have to give access to each of those entitlements in order for the backup to run. These include Contacts, Photos, Videos, Calendars, and Reminders.

To get started, first go to the Package Center on a Synology. Then, search for Acronis.

At the listing for Acronis True Image, click Install. Once installed, make sure you’re accessing your Synology through the web interface directly rather than through QuickConnect. This would be http://<IPADDRESS>:5000. From there, open the Main Menu and then open Acronis True Image from there.

Now, install the Acronis Mobile app from the iOS App Store ( 

https://itunes.apple.com/us/app/acronis-true-image-mobile/id978342143?mt=8 ) on the iOS device you’ll be backing up. Once installed, open the app and tap on Back up to computer or NAS.
Then tap SCAN QR CODE.

Then provide access to the camera in order to scan the QR code. 

Then choose what you’d like to back up and tap on Back up now.

Once the backup is complete, you’ll see the backup shown on the Synology when you open up the Acronis app.

Backing up to iCloud is still the only way to get everything else. But it’s still useful in some ways (e.g. if you are a real estate agency and just want to back up Contacts and Photos in case something happens).

April 8th, 2018

Posted In: Synology

Tags: , , ,

« Previous PageNext Page »