Industry guru Dave Taylor answers free tech support questions about a wide variety of business and technical topics, including blogging, Google AdSense, MySpace, Sony PSP, Apple iPod, Mp3 players, management, Linux, SEO, Mac OS X, Facebook, Twitter, LinkedIn and Microsoft Windows.

How do I disable guest access on my Mac for wireless users?

Dave, I remember in MacOS 9 that it was pretty easy to disable guest access to your Macintosh, but in Mac OS X I can't find any clue how to change this so that while I offer file sharing off my server, it's only for people with actual accounts. Can you shed some light on this?

Dave's Answer:

You're right and I don't really understand why Apple made it seemingly impossible to disable guest access while still running file sharing.

Fortunately, if you're willing to muck about in the innards of your system, guest access can be disabled from within the Terminal (Applications -> Utilities -> Terminal).

The first step is to open up a Terminal window and crack your knuckles. It'll help you feel like a real Mac OS X power user!

Now, type in cd /Library/Preferences to move into the correct directory on your system. You can confirm it worked by typing pwd to see where you are in the file system.

Next, it's time to save the existing preferences file for Apple File Sharing before we fix it. Just in case...

$ cp com.apple.AppleFileSharing.plist \
  com.apple.AppleFileSharing.plist.bkup
$

Now that you have a backup copy in case things go horribly wrong (but they won't, don't panic), it's time to edit the preferences file to disable guest access. To accomplish this, you need to be root so that you have write permission with the file, so you'll need to use the sudo utility.

Using your favorite editor (mine is vi) you need to edit the com.apple.AppleFileSharing.plist file. Here's how I do this using vi and sudo: sudo vi com.apple.AppleFileSharing.plist. It prompts for the sudo password: type in your account password again, and if you're authorized to use sudo, you'll be editing the file.

Once you're in the file, you need to search for "guestAccess", which will look like this:

<key>guestAccess</key>
<true/>

To disable guest access, carefully delete the word 'true' immediately following the guestAccess entry, then replace it with the word 'false'. The final line will look exactly like this:

<false/>

Make double-sure that you still have the < and the /> surrounding the new false entry, then save the file, quit, and you're done!

The easiest way to have the Apple File Sharing system know about this configuration change is to reboot your computer, but you can also go to Apple -> System Preferences -> Sharing, then click on the Services tab and turn off, wait 30 seconds, and turn back on File Sharing.

This is a remarkably complex solution because there is no simple way to turn off guest access on your Mac running Mac OS X. I don't really understand why Apple's made it this hard, but now you know how to fix it.



Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Simpy.

Subscribe!

Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.

Comments

In more recent versions of Mac OS X the file involved is /Library/Preferences/com.apple.AppleFileServer.plist

This whole procedure can be simplified to one Terminal command:

sudo defaults write /Library/Preferences/com.apple.AppleFileServer guestAccess 0

Posted by: Curious Rabbit at November 3, 2005 5:36 PM

I have a lot to say, but ...
Starbucks coffee cup I have a lot to say, and questions of my own for that matter, but most of all I'd like to say thank you for all your efforts on this Web site by buying you a chai!

I do have a comment, now that you mention it!









Remember personal info?


Please note that I will never send you any unsolicited commercial email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.









Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.


Help!





Subscribe to
Ask Dave Taylor!

Add to Google Reader
Add to My Yahoo!
Subscribe in NewsGator Online

RDF   XML

Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.


Recent Entries
Join the List!
Join my author info mailing list, where you'll learn about my upcoming books, speaking gigs, and more!


Book Links
© 2002 - 2008 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]