Thursday, July 2nd, 2009
|
|
3:15 pm - Defining global printer presets for all users on a MacOS X computer
|
Note: All references to "MacOS X" in the following apply to Leopard (MacOS 10.5) and Tiger (MacOS 10.4). I haven't needed to investigate how the earlier versions did things.
As part of the implementation of our new unified printing and copying system, I needed to find a way to enforce some printing defaults on the various printer queues. On the Windows side this was relatively easy; settings assigned to the queues on the print server are inherited by all users on the domain.
MacOS X does things a bit differently. One of the things I like about Mac printing is that users can create printer "presets" that are printer-independent. You start with the default "Standard" preset, make the changes you want (eg duplex printing, forced B&W output etc), and then save the new profile under a name of your choice. You can use these profiles with any of your printers, and the Mac quietly ignores any of the settings that don't apply to that particular printer (eg duplex printing on a printer that can't duplex).
Each user on the Mac can have their own set of unique presets. Leopard and Tiger store the printer presets in the file
~/Library/Preferences/com.apple.print.custompresets.plist
But what if you want to provide a common set of presets to all users on the Mac? ( It turns out to be relatively simple. )
current mood: working current music: The slightly louder hum of computer fans...
|
|
(2 comments | comment on this)
|
|
|
2:37 pm - Setting up a unified printing and photocopying system
|
Over the last 6 weeks or so, I've been setting up a new unified printing and photocopying system for my workplace. It's been an interesting experience, pretty much equal parts joy and pain.
I've learned some interesting new things, in particular a lot about setting up and configuring Canon's UniFlow Output Manager, which I'll put up here in bits and pieces over the next few weeks as time allows. It may help other people in future.
current mood: accomplished current music: The soothing hum of computer fans...
|
|
(comment on this)
|
|
Thursday, October 30th, 2008
|
|
3:55 pm - Enabling MacOS 10.5 computers to connect to samba shares
|
A while back, I discovered that MacOS 10.5 didn't want to talk to a samba server. I found a solution to the problem on the web, implemented it and promptly forgot it.
Today I needed to connect to a different samba server, and couldn't. Two minutes comparing the smb.conf files reminded me of the solution, which I'm putting here so I don't forget it again:-)
The SMB implementation used by the MacOS 10.5 Finder won't talk to a samba server unless it has a browseable share.
In the past we had browseable shares on our samba servers, but users started demanding access to every share they could see was present, even though these shares had nothing to do with their areas of interest/job. So we haven't had browseable shares for quite a while.
The following share definition provides the browseable share that MacOS 10.5 needs, without exposing anything of relevance.
[browse$]
path =/dev/null
comment = browseable share to make leopard happy
write list = nobody
writeable = no
browseable = yes
guest ok = no
create mask = 644
directory mask = 755
force group = nobody
force user = nobody
|
|
(2 comments | comment on this)
|
|
Friday, January 25th, 2008
|
|
1:37 pm - Mounting partitions at particular locations in MacOS 10.5 (Leopard) - take 2
|
OK, the method I mentioned here works, but has a few problems on some 10.5 Macs - the startup time increases by a factor of 10 or so. Quite rude.
I did some web searching ,and it turns out that the autofs system isn't able to resolve the "LABEL=turbidite" part of the /etc/fstab file the first time it tries to access it, and keeps trying until the process that associates the label with the partition finally fires up.
If you use the partition's /dev/disk* path in your /etc/fstab instead, it boots up at the same speed it would if it was all one drive, ie quite quickly.
So if your partition is at /dev/disk0s3, your /etc/fstab file should look like this:
/dev/disk0s3 /Users hfs rw 1 2
current mood: accomplished
|
|
(comment on this)
|
|
Monday, December 3rd, 2007
|
|
4:25 pm - Mounting partitions at particular locations in MacOS 10.5 (Leopard)
|
Let's assume you have two partitions on your Mac's hard drive:
1) a partition that contains the operating system and installed programs (call it MacHD) 2) a partition that contains all of the users' files, that will be mounted at /Users (call it something unique to the individual computer, eg turbidite)
Under 10.4, you'd map turbidite to /Users by creating /etc/fstab with the following contents:
LABEL=turbidite /Users hfs rw 1 2
then load it into the NetInfo system using the following command:
sudo niload -m fstab / </etc/fstab
and then reboot the computer to make the change take effect.
But niload is gone under 10.5 (Leopard), as is the whole NetInfo directory system. So how do you mount the partition?
It turns out it's incredibly easy. You only have to create the /etc/fstab file and then reboot the machine. The autofs system under 10.5 will actually read /etc/fstab and perform the mounts specified therein.
This is incredibly spooky - you'd almost think you were working with BSD :-)
Amended to add:
There are some problems with this method - a better one is outlined here.
current mood: pleased
|
|
(comment on this)
|
|
Wednesday, January 17th, 2007
|
|
1:43 pm - Removing the hard drive from a G3 iBook
|
An old G3 iBook at work has decided it no longer wants to boot from the internal hard drive. Booting it in target disc mode or from a CD-ROM was fruitless - the hard drive isn't showing up.
Not good. Well at least it should be relatively easy to replace the drive...
Er, no. Where's the HD in this thing? Apple's web site wasn't particularly helpful, but I eventually found the iFixit Guide to replacing the HD in a G3 iBook. I'm wondering if it's worth removing the 40+ screws...
current mood: annoyed current music: Always Something There To Remind Me (on the radio)
|
|
(comment on this)
|
|
Wednesday, December 13th, 2006
|
|
3:29 pm - Fun with Classic on a MacOS X computer
|
|
|
Friday, August 25th, 2006
|
|
4:30 pm - Installing XP on a new MacBook Pro
|
Work has bought its first 15" MacBook Pro, which was handed to me to prepare for use.
The end-user needs to use both MacOS X and Windows XP (there are a couple of *really* useful tools that are Windows only); the MacBook Pro was bought so they could have both operating systems on one laptop. We're likely to end up with more than a few users using this set-up, so getting it to work is vital.
( You'd think it would be easy, wouldn't you? )
current mood: working current music: A song I don't know the name or singer of (on the radio)
|
|
(comment on this)
|
|
Friday, July 21st, 2006
|
|
3:24 pm - Getting the EndNote 9 conduit to work with a Palm
|
EndNote has had a Palm version of their software since at least EndNote 7. EndNote for Palm v.1 worked quite happily with my Palm m100.
I recently upgraded to EndNote 9, only to discover that it needed EndNote for Palm v.2, which wouldn't work with my m100. Since the m100 was getting on a bit, and my needs had started to exceed its capabilities, I went out and bought a new Palm Z22.
After updating all the relevant software, I found that while EndNote for Palm v.2 was installed on the Z22, the conduit that transfers information between EndNote on the Palm and EndNote on the Windows box wasn't working when I logged on as a restricted user (it worked ok if I logged on as a user with administrative privileges). Argh!
( It didn't take too long, however, to get it to work. )
current mood: sleepy current music: none - the radio is turned off
|
|
(comment on this)
|
|
Friday, February 24th, 2006
|
|
2:00 pm - Compacting all mailboxes in Eudora on a Mac
|
The Windows version of Eudora has a wonderful option (Special -> Compact Mailboxes) for compacting all of the mailboxes at once.
Many many years ago, this option was also available in Eudora on a Mac, but it disappeared in the transition from Eudora 1.4.1 to Eudora 3.
Fortunately you can AppleScript your way around the problem. The following wonderfully small AppleScript serves the same function:
tell application "Eudora"
compact
end tell
Saved as a run-only application, it's allowed our Mac users to quickly compact all their mailboxes.
current mood: accomplished current music: 2PM news update (on the radio)
|
|
(comment on this)
|
|
Tuesday, January 31st, 2006
|
|
1:28 pm - MacOS X.4 & connecting to SMB shares
|
The "geniuses" at Apple decided that from MacOS X.4, the default behaviour when connecting to an SMB share would require you to use an encrypted password. Note that this is regardless of whether the SMB server used encrypted passwords or not; so rather than doing something sensible like checking for an encrypted password link and using it if it exists, and falling back to using ye olde insecure SMB password exchange if not, it refuses to connect to an SMB server that isn't using encrypted passwords.
You can change this behaviour; as root (use sudo from the administrator's account, as you really shouldn't have the root account login enabled) create /etc/nsmb.conf containing the following text:
[default] minauth=none
and reboot the computer.
Apple's decision is even stranger in light of their refusal to update the version of mount_smbfs they are using to one that supports SMB signing (ie as used by default on Windows 2003 servers). A colleague raised this at a recent WWDC and was told "we don't do SMB signing, Thursby do" - thanks, Apple, but I don't have the budget to pay for a DAVE license for every Mac, and shouldn't have to. mount_smbfs has supported SMB signing for over a year now.
SAMBA also supports SMB signing, but Apple have also removed the smbmnt component from their samba , so you can't mount the share that way. The smbclient component of Apple's samba doessupport SMB signing, but how many end users are going to want (or be able) to use smbclient?
So how do you connect to SMB shares on a Windows 2003 Server from MacOS X? You don't, unless you turn off SMB signing on the server. Microsoft recommend you don't do this, as it interferes with the smooth running of Windows 2003-based domain (ie it breaks things). Since most of the computers on site are running Windows, and break often enough already, I'll take their word for it.
We "solved" the problem by installing the AppleTalk Server support on the Windows 2003 server, and sharing stuff out that way. It's not an ideal solution by any means - I had hoped to abolish AppleTalk along with MacOS 9 :-(
current mood: irritated current music: Fool if You Think It's Over - Chris Rea (on the radio)
|
|
(comment on this)
|
|
Thursday, December 22nd, 2005
|
|
2:05 pm - Text of README file to include on multi-disc restore DVDs
|
The following is the generic version of the document I include on every DVD in a two-disc restore DVD set. Note that these instructions assume that there is a volume on the computer named "HD2", and that is has enough free space to hold the entire restore image.
It works for us, but as with all pieces of information you find on the Internet, use at your own risk.
Obviously these instructions should be customized to describe the specific restore DVDs you are creating. In the event that you need more than two DVDs to hold the restore image, these instructions should be modified accordingly.
Instructions for a single-disc restore DVD can be found here.
( Instructions to include on two-disc restore DVD set )
current mood: exhausted current music: Rubber Bullets - 10CC (on the radio)
|
|
(4 comments | comment on this)
|
|
|
1:51 pm - Text of README file to include on single-disc restore DVD
|
The following is the generic version of the document I include on every single-disc restore DVD. Obviously it should be customized to describe the specific restore DVD you are creating.
It works for us, but as with all pieces of information you find on the Internet, use at your own risk.
Instructions for a multi-disc restore DVD set can be found here.
( Instructions to include on single-disc restore DVD )
current mood: sleepy current music: Amazing - Alex Lloyd (on the radio)
|
|
(comment on this)
|
|
Tuesday, September 27th, 2005
|
|
12:53 pm - Making restore disc images for MacOS X computers
|
This is the procedure I developed at work to create restore disc images for MacOS X computers.
It works for us, but as with all pieces of information you find on the Internet, use at your own risk.
( The procedure )
current mood: busy current music: The Hollies - The Air That I Breathe (on the radio)
|
|
(comment on this)
|
|
Monday, September 26th, 2005
|
|
2:59 pm - Making an emergency boot CD for MacOS X
|
This is the procedure I developed at work to create an emergency boot CD for MacOS X computers. Creating an emergency boot CD is one of the important precursor steps to creating a restore disc image of your Mac's boot volume, a procedure I'll describe later in the week.
It works for us, but as with all pieces of information you find on the Internet, use at your own risk. ( The procedure )
current mood: awake current music: Walk On By - Seal (on the radio)
|
|
(comment on this)
|
|
Wednesday, August 31st, 2005
|
|
4:19 pm - Unlocking all files in a directory tree in MacOS X
|
Ah, if only I'd come across this before I had to migrate that user from MacOS 9 to Windows - it would have made things a lot easier!
MacOS X has a wonderful command-line tool called chflags. Typing
chflags -R nouchg /path/to/files
at the command prompt recursively unlocks everything in the directory /path/to/files and all of its subdirectories.
|
|
(comment on this)
|
|
Tuesday, August 30th, 2005
|
|
12:37 pm - Gotchas in migrating a user from MacOS 9 to Windows
|
I just had to migrate a user from MacOS 9 to Windows - fun fun fun. Before starting, I made a complete backup of the user's files in a disc-iamge file, so I could restore them if somethnig went screwy in the conversion process.
There were a few gotchas during the transfer:
- Converting Eudora files
Eudora technical support have a document called Migrating from MAC to Windows that outlines the migration procedure. One of the big problems is dealing with the differences in the eond-of-line characters used by each operating system. The document suggests FTPing the files in text mode so that this conversion process happens automagically for you. But what do you do if your computing environment doesn't allow you to FTP between Mac and Windows?
Fortunately the user only had a few (~5) mailboxes; these were transferred to Windows, opened in Microsoft Word (which fortunately understands Mac, Windows and UNIX EOL markers) and save as out as Windows text files.
- Lack of file extensions
MacOS 9 doesn't use file extensions - it uses the MacOS creator code and file type to identify what type of file it is dealing with. I wrote an some applescript code to rename common file types with the appropriate extension
( The Applescript code )
If you're going to use this code, obviously you'll need to change the file location specified in the line
set outputFile to "HD2:rename_problems.txt"
to point to somewhere on your own system.
Unfortunately, while the code works brilliantly on a MacOS X machine, it has a tendency to fall over under MacOS 9 with a somewhat cryptic error message:
because *Ox//* the original item cannot be found
Fortunately I have a MacOS X machine handy, so I transferred the user's files to it and ran the script over the files.
The user had Office documents created by four different generations of Office for Mac, but fortunately the creator code for the files hadn't changed in that time. The script's treatment of Office documents is a bit rough-and-ready - basically anything created by Word gets ".doc" as it's extension, regardless of whether it is a Word doc, an RTF doc, a document template or whatever. Same goes for Excel docs (they all get ".xls") and PowerPoint docs (they all get ".ppt"). Office 2003 seems perfectly capable of figuring out what the files are at the receiving end.
The output file produced by the applescript code lists files the script couldn't deal with - some are locked, and some just generate problems which are (apparently) due to the phase of the moon. More interestingly, after going in and manually correcting the problems it identified on the first run, it found a number of additional problems on the second run. It took four runs in all before it ran without complaint. This was still much faster than renaming every single file by hand.
- Illegal file names
The last problem was with illegal filenames - the user had used a lot of characters in their filenames that are illegal as far as Windows filenames are concerned. Since the files were now on the MacOS X machine, I was able to write a short Perl script to remove all of those illegal characters from the file names.
( The perl script )
It's interesting to note that this Perl script took less than five seconds to run over the entire directory structure containing the user's files - the Compiled Applescript application took ~5 minutes. If I need to use this again, I'll probably rewrite the applescript code in Perl so that the one script does the whole lot.
|
|
(comment on this)
|
|
Tuesday, August 16th, 2005
|
|
3:03 pm - Dealing with the latest W32.spybot variant
|
The following is the method we've figure out at work for removing the latest W32.spybot variant that hit us this morning. Hopefully it will be of use to some of you!
Note that all of the machines we've had infected were running Windows 2000 - the worm may behave differently under Windows XP.
As far as we can tell, this variant has yet to be described/named by Symantec or Macafee, however it is a variant of what Symantec call W32.spybot.NLX and Macafee call W32/Sdbot.worm.gen.i
1) Reboot the computer in safe mode
2) Delete the following files:
%windir%\smsc.exe %windir%\system32\rdriv.sys %windir%\system32\i
3) Delete the following registry keys, if they exist:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_RDRIV HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_WSCSVC HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_WINSMSC
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanmanager\parameters\AutoShareWks HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanmanager\parameters\AutoShareServer
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanmanstation\parameters\AutoShareWks HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanmanstation\parameters\AutoShareServer
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanmanserver\parameters\AutoShareWks HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanmanserver\parameters\AutoShareServer
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\rdriv HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wscsvc HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WINMSC
4) Change the values of the following registry keys:
"EnableDCOM" = "Y" in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLE "restrictanonymous" = "0" in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Also look in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\AutoUpdate at the value of "AUOptions" - the worm will have changed this to "1", but the value you want here will probably be different. On our machines which automatically update (and therefore didn't get infected), it is set to "0". However other information to hand indicates:
; AUOptions - defines the behaviour of AutoUpdates ; 2 = notify of download and installation ; 3 = automatically download and notify of installation ; 4 = automatic download and scheduled installation
So I guess you'll have to know what value you *should* have in that registry key.
At this point, it's a worthwhile running your (should be up-to-date) anti-virus software over the computer to make sure nothing else is lurking around, and then reboot the computer.
ETA: Changed text dealing with AUOptions key, to make it more useful.
|
|
(comment on this)
|
|
Wednesday, August 10th, 2005
|
|
1:23 pm - Stopping an annoying piece of behaviour in Word 2003
|
Word 2003 has a nasty habit of reformatting your entire document[1] every time you reformat a paragraph that is in the normal style. Your then have to hit Control-Z to get it to undo all those changes, leaving only the paragraph you wanted modified actually modified.
This is caused by a nasty feature that they added to the Styles definitions in Word 2003[2]; the "Automatically update" tick box. If it is ticked for a style, Word 2003 automatically updates every paragraph using that style, without politely asking you if it is OK to do so[3]. If the box is ticked for the Normal style, it causes the problem described in the first paragraph.
I discovered (by accident, after playing around with some style definitions) how to turn this nasty behaviour off:
- Open a Word document.
- Choose "Styles and Formatting..." from the "Format" menu
- The Styles menu will appear on the right-hand side of the Word window. Right-click on the "Normal Style", and choose "Modify" from the content menu.
- The "Modify Style" dialog box will appear. Uncheck the "Automatically update" box.
- Click on the "OK" button.
Word 2003 should now stop reformatting your entire document every time you change the formatting on a paragraph that is based on the Normal style (ie nearly all of them).
If you want to make this the default behaviour for all new word documents, open a new document, then repeat the above steps, with the addition of checking the "Add to template" box in the "Modify Style" dialog box.
---
[1]Technically, every paragraph in a style based on the Normal style. [2]I suppose it could have been added in Word XP (I upgraded from Word 2000 straight to 2003), but none of the XP users around here have complained about it. [3]Which Word 2000 did.
current mood: working
|
|
(2 comments | comment on this)
|
|