Linux – Add a File extension to files without one

I’m in the middle of upgrading some Linux servers (Debian, Ubuntu) to a version that includes Apache 2.4. The config files and symlinks that are present in many of these have no extension. This is how to add .conf to the symlinks in /etc/apache2/sites-enabled in a jiffy…

cd /etc/apache2/sites-enabled/
find . -not -name "*.*" -print0 |xargs -0 file |sed 's/:.*//' |xargs -I % mv % %.conf

Note add an echo command in front of the “mv” command to test this out without changing anything.

References: http://stackoverflow.com/a/6115923

Posted in Linux | Tagged , , , , , | Leave a comment

Disable Mission Control Shortcuts via MCX in Workgroup Manager (Lion, Mountain Lion, Mavericks)

Last year I posted an article on how to disable “Spaces” using MCX (plist). This is a requirement for the “Smarter Balanced Assessments” that we are giving in the schools this spring. This year there is one addition to the .plist that is needed or you will not be able to run the CTSecureBrowser app without error. In additional to 79, 80, 81 and 118 you need #82 as well.

		<key>82</key>
		<dict>
			<key>enabled</key>
			<false/>
			<key>value</key>
			<dict>
				<key>parameters</key>
				<array>
					<integer>65535</integer>
					<integer>124</integer>
					<integer>393216</integer>
				</array>
				<key>type</key>
				<string>standard</string>
			</dict>
		</dict>

So the whole file will now look like the below snippet. Just save that as com.apple.symbolichotkeys.plist and import into your user group.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>AppleSymbolicHotKeys</key>
	<dict>
		<key>118</key>
		<dict>
			<key>enabled</key>
			<false/>
			<key>value</key>
			<dict>
				<key>parameters</key>
				<array>
					<integer>65535</integer>
					<integer>18</integer>
					<integer>262144</integer>
				</array>
				<key>type</key>
				<string>standard</string>
			</dict>
		</dict>
		<key>79</key>
		<dict>
			<key>enabled</key>
			<false/>
			<key>value</key>
			<dict>
				<key>parameters</key>
				<array>
					<integer>65535</integer>
					<integer>123</integer>
					<integer>262144</integer>
				</array>
				<key>type</key>
				<string>standard</string>
			</dict>
		</dict>
		<key>80</key>
		<dict>
			<key>enabled</key>
			<false/>
			<key>value</key>
			<dict>
				<key>parameters</key>
				<array>
					<integer>65535</integer>
					<integer>123</integer>
					<integer>393216</integer>
				</array>
				<key>type</key>
				<string>standard</string>
			</dict>
		</dict>
		<key>81</key>
		<dict>
			<key>enabled</key>
			<false/>
			<key>value</key>
			<dict>
				<key>parameters</key>
				<array>
					<integer>65535</integer>
					<integer>124</integer>
					<integer>262144</integer>
				</array>
				<key>type</key>
				<string>standard</string>
			</dict>
		</dict>
		<key>82</key>
		<dict>
			<key>enabled</key>
			<false/>
			<key>value</key>
			<dict>
				<key>parameters</key>
				<array>
					<integer>65535</integer>
					<integer>124</integer>
					<integer>393216</integer>
				</array>
				<key>type</key>
				<string>standard</string>
			</dict>
		</dict>
	</dict>
</dict>
</plist>
 
Posted in Macintosh, Network Administration | Tagged , , , , | Leave a comment

Apple Profile Manager Missing Disable Wifi?

I’m in the middle of migrating from WGM to Apple’s MDM/Profile Manager. I was baffled to find that the simple checkbox to disable Wifi and Internet Sharing was missing. When your organization has a bunch of imacs in labs you do not want someone connecting the wifi to a hotspot to bypass your LAN.

So to solve this you have to do it in the “Custom Settings” section.
Add a preference called: com.apple.MCXAirPort with a value of DisableAirPort, Boolean and check it off.

DisableAirPort

To disable Internet Sharing add another one…
com.apple.MCX, value of: forceInternetSharingOff, boolean, checked.

DisableInetSharing

Posted in Macintosh, Network Administration | Tagged , , , , , , | Leave a comment

Deploying Firefox v35.0 in the Enterprise vs Macintosh

I’ve used CCK for a while with great success at locking down preferences for firefox on both the Mac and PC platforms at my workplace. Recently though things have gotten very confusing as the development team has moved the location that you should place /distribution/bundles/.

With version 33 of Firefox and many previous versions it worked by putting your packaged extension here: Firefox.app/Contents/Resources/distribution/bundles

Suddenly in version 34 that no longer worked, but with some trial and error I found it would work in this directory: Firefox.app/Contents/MacOS
Now we have version 35 and guess what it was moved back to the old location…

I’d really like to figure out how to get my CCK extension to run from /Library/Application Support/Mozilla/Extensions/ without having to change my Firefox.app at all. Since the new code signing restrictions are in place the Mac OS gets really mad if I change anything in the Firefox.app package. If anyone knows drop me a line!

Some useful Firefox deployment resources…
http://mike.kaply.com/category/mozilla/
http://krypted.com/mass-deployment/deploying-and-managing-firefox-the-rough-guide/
https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment

Posted in Macintosh, Network Administration, Software | Tagged , , , , | Leave a comment

Is that website safe?

Let say you are thinking of purchasing something online or you are not sure in general about the safety of a certain website. How can you tell? I just cam across this little page that Google has for their Safe Browsing…
http://google.com/safebrowsing/diagnostic?site=weebly.com/
In this case I have weebly.com in their because it is good to know if your “free” website host also allows malware or has a history of it. If you put wordpress.com in there you will see similar results. Although not as drastic.
http://google.com/safebrowsing/diagnostic?site=cswtech.wordpress.com/ looks clean as a whistle 🙂
Have a great day.

Posted in Computer Security | Tagged , | Leave a comment

Disable Mission Control Shortcuts via MCX in Workgroup Manager (Lion, Mountain Lion)

Due to some standardized testing applications I had a requirement to turn off the Mission Control keyboard shortcuts in Lion and Mountain Lion. To do so I turned them off manually in the keyboard system preferences and then checked ~/Library for changes. I found that the ~/Library/Preferences/com.apple.symbolichotkeys.plist was changed. The file had quite a list of options in it so I did a bit of googling around for “symbolichotkeys disable Mission Control”. This led me to a somewhat helpful post here…
https://jamfnation.jamfsoftware.com/discussion.html?id=9503
With that I searched through my own com.apple.symbolichotkeys.plist file and found the 79, 80, 81 and 118 keys and copy/pasted them into a clean plist doc with just those four settings. I added those to WGM to apply to the group I needed these settings and called it a day.

More useful information about Keyboard shortcuts also found here…
http://hintsforums.macworld.com/showthread.php?t=114785
http://krypted.com/mac-os-x/defaults-symbolichotkeys/

This is the contents of the file I used…

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
 <key>AppleSymbolicHotKeys</key>
 <dict>
 <key>118</key>
 <dict>
 <key>enabled</key>
 <false/>
 <key>value</key>
 <dict>
 <key>parameters</key>
 <array>
 <integer>65535</integer>
 <integer>18</integer>
 <integer>262144</integer>
 </array>
 <key>type</key>
 <string>standard</string>
 </dict>
 </dict>
 <key>79</key>
 <dict>
 <key>enabled</key>
 <false/>
 <key>value</key>
 <dict>
 <key>parameters</key>
 <array>
 <integer>65535</integer>
 <integer>123</integer>
 <integer>262144</integer>
 </array>
 <key>type</key>
 <string>standard</string>
 </dict>
 </dict>
 <key>80</key>
 <dict>
 <key>enabled</key>
 <false/>
 <key>value</key>
 <dict>
 <key>parameters</key>
 <array>
 <integer>65535</integer>
 <integer>123</integer>
 <integer>393216</integer>
 </array>
 <key>type</key>
 <string>standard</string>
 </dict>
 </dict>
 <key>81</key>
 <dict>
 <key>enabled</key>
 <false/>
 <key>value</key>
 <dict>
 <key>parameters</key>
 <array>
 <integer>65535</integer>
 <integer>124</integer>
 <integer>262144</integer>
 </array>
 <key>type</key>
 <string>standard</string>
 </dict>
 </dict>
 </dict>
</dict>
</plist>
Posted in Macintosh | Tagged , , , | 1 Comment

Deleting Troublesome files from Windows Servers

Scenario…
If you have a windows server and a mac client, the mac will put resource fork files on your shares. These files sometimes are not removable or even readable by windows.
Sometimes a client (Win or Mac) will save an incredibly long file name to their home directory. When it comes to server migration or just cleaning them up they can be troublesome.
To remove them you have to get the DOS 8.3 equivalent filename and remove them on the command line.

Lets say the troubled file is a system file called ._dan
To remove it list the directory like this if the file had a hidden attribute…
dir /X E:\home\users\username\ /AH
From that list I found the file I was looking for and made this command to delete the file…
del /aH E:\home\users\username\_DAN~1

If the file was not hidden just remove the /AH…
del E:\home\users\username\_DAN~1

Or there is an incredibly long filename…
data=Ay5GWBeob_WIPLDYoIWcfVXxvZu9XwJ55OX7Ag,JPvjaA-P4_0vCD8DrIvOfUHUfyQbx-V29OHRfM6Do8qJhdQDHhXB8bs-LWy0uhuIswGKOYHSF3puXl4MjJkukEQ164C8vB7oFaR7pNSB11FfHg9u5lUPcL7FMb-5kd4yeDqL0EtvMHO6d2FI1ME8L1hUN75-X677MHZFO8T5mgmkPo_-t-HTU_Sl86jXV-0xRGFHbzJ.JPG
Do this….
del E:\home\users\username\DATA_A~1.JPG
Posted in Windows | Tagged , , , | Leave a comment