• Mac OS X,  Mac Security

    Lecture Your Sudoers

    /etc/Sudoers is a file that controls what happens when you use sudo. /etc/sudo_lecture is a file that Apple includes in macOS that tells your users that what they’re about to do is dangerous. You can enable a lecture, which will be displayed each time sudo is invoked. To turn on the lecture option in sudo, open /etc/sudoers and add the following two lines (if they’re not already there): Defaults lecture=alwaysDefaults lecture_file = “/etc/sudo_lecture” Then save the file and edit /etc/sudo_lecture. Apple has kindly included the following Warning: Improper use of the sudo command could lead to data loss or the deletion of important system files. Please double-check your typing when…

  • Mac OS X,  Mac Security

    Disable The Connect To Server Option

    You can disable the Connect to Server menu in OS X. This can be done via MDM or using defaults. To do so with the defaults command, send a ProhibitConnectTo key into com.apple.finder as True and then restart the Finder, as follows using the defaults command: defaults write com.apple.finder ProhibitConnectTo -bool true ; killall Finder To undo: defaults write com.apple.finder ProhibitConnectTo -bool false

  • Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment,  Windows XP

    Scripting PGP Whole Disk Encryption On A Mac (or Windows, really)

    The PGP Whole Disk Encryption (WDE) tools have a command line interface for both OS X and Windows. The options are mostly the same across the two. We’ll focus on two for the purposes of this little article. The first is –list-user and the second is –change-passphrase, although there are a number of other options. A general breakdown of the options include the following: –enum – show the disks available –disk-status – show the encryption status disk indicated with the –disk option –stop – stop the encryption or decryption process of a –disk using –passphrase –instrument – Install BootGuard using the –disk option followed by the number of the disk…

  • Network Infrastructure

    APIPA, Not Just An Acronym Palindrome

    The acrodrome (yes, I just made that up, although I wasn’t sure if palinym was a better choice – decided on acrodome because I wasn’t as afraid of Tea Party snipers coming to murder me as I would have been if I used palinym) APIPA stands for Automatic Private IP Addressing. APIPA is in every version of Windows since NT and all versions of Mac OS X. APIPA is a dhpc mechanism that provides dhcp clients with self-assigned IP addresses when DHCP servers are not available. When there isn’t a DHCP server available, APIPA assigns IPs from 169.254.0.1 to 169.254.255.254 with a default mask of 255.255.0.0. Clients leverage arp to…

  • Mac OS X Server,  Ubuntu,  Unix,  WordPress

    WordPress Site Stuck In Maintenance Mode

    When doing updates in WordPress, upgrading the WordPress version or the Plug-Ins causes the site to enter into Maintenance Mode. While in Maintenance Mode, a message appears that says “Briefly unavailable for scheduled maintenance. Check back in a minute.” rather than the actual site. Sometimes, especially if you’re using the automatic updating functions, an update might fail and the site may be stuck in Maintenance Mode. WordPress looks at the root level of a directory for some hidden files that can tell a site to operate in a different manner. If there’s a file called “.maintenance” then the site will display the message above. When an update of a Plug-in fails,…

  • Mac OS X Server,  Mass Deployment

    Allow Diskless NetBoot From the Command Line

    Client systems don’t have to have drives. Nor should they, in certain circumstances. Therefore, diskless NetBoot has been a part of OS X since the early beginnings. And it’s great provided you have the Server Admin application handy. But if you want to enable/control diskless NetBoot without Server Admin then you’re going to need to use the command line. Each of your NetBoot images will be stored in an array, which can be seen by running the serveradmin command, along with the settings option and then the net boot service, as follows: serveradmin settings netboot Locate the netBootImagesRecordsArray, which shows the images that are served up on the server. Find…

  • Mac OS X

    Lion's Versions Feature

    In Mac OS X Lion, applications can make use of a feature to auto-save and version files. This feature locks files that are inactive for editing and when the file is unlocked then starts automatically saving versions. If you have a problem with the file you can then always step back to a previous version of the file. The feature is manifested in the title bar and the file menu of applications that make use of it. When you open a file, it can be locked. Viewing the file in the Finder also shows that it is locked. Clicking on locked provides the option to unlock. Once unlocked you can…

  • iPhone,  Mac Security

    Finding iOS Device PINs

    Each time you sync an iOS based device, a backup is made (unless you disable the option). These are stored in ~/Library/Application Support/MobileSync/Backup. Here you will find a number of folders, each beginning with the UDID of the iPhone, iPad or iPod Touch that has been backed up. The contents of these folders can be used to restore a device in the event that the device falls outside your control. Within the folders are a bunch of files with alphanumeric names that look garbled, even though some can be viewed using a standard text or property list editor (while others are binary). But there are also a bunch of other…

  • Ubuntu,  Unix

    Ubuntu and Firewalling

    Using the firewall in Ubuntu can be as easy or as hard as you want to make it. BSD variants all basically use the ipfw command whereas most of the rest of the *nix world will use netfilter. Netfilter has a number of front ends; the one that comes pre-installed in Ubuntu is ufw, short for ‘uncomplicated firewall’. Ufw is good for basic port management: allow and deny type of stuff. It’s not going to have the divert or throttling options. So let’s look at some basic incantations of ufw (you need to have elevated privileges to do all of this btw). Initial Configuration First you need to enable ufw,…

  • Mac OS X

    Disable Caps Lock in Mac OS X

    I don’t think I’ve actually used the caps lock key in years. Well, scratch that, I’ve frustratingly used it by accident. I did a post a couple of years back with a couple of ways to disable it for Windows. But recently I’ve been doing a lot of work and have accidentally made the amount of work a little more by enabling the caps lock key and typing entire paragraphs. So to disable, open the Keyboard & Mouse Preference Pane from System Preferences and then click on Modifier Keys. From here, change the Caps Lock Key value to No Action. Check out com.apple.systempreferences.plist and the com.apple.preference.keyboard.config array within it for…