Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to enable SAMBA (SMB) from terminal.

This enables AFP and File Sharing:

sudo launchctl load -F /System/Library/LaunchDaemons/

But I want enable SMB too from terminal. How can I do that? I need this for MAC OS X (10.5, 10.6, 10.7).

P.S. Same effect if you go to System Preferences->Sharing->File Sharing->SMB (Windows) need to be enabled.

share|improve this question

migrated from Oct 23 '11 at 20:22

This question came from our site for professional and enthusiast programmers.

I'm quite sure you could somehow record an Automator action workflow thingie for this and run it. EDIT: Ignore that, you want to do it from the terminal. – Tristan Seifert Oct 23 '11 at 19:48

If you run the following:

sudo launchctl load -F /System/Library/LaunchDaemons/

The service will launch, although the GUI won't update (as you force loading the service, even if disabled).

You can also remove the Disabled flag from the file and have it load regularly.

You can also run /usr/sbin/smbd directly, as root.

share|improve this answer
Thanks. But first option won't work on Snow Leopard.Couldn't stat("/System/Library/LaunchDaemons/com.appl.smbd.plist"): No such file or directory. – User1234 Oct 24 '11 at 6:07
@User1234 You mistyped the file name: appl – Daniel Beck Oct 24 '11 at 6:13
sorry. here it is Couldn't stat("/System/Library/LaunchDaemons/"): But it works for Lion, I guess on Snow Leopard it is ddifferent. It doesn't update UI , but it is avalaible? – User1234 Oct 24 '11 at 6:17
I guess on MAC OS X Snow Leopard it is – User1234 Oct 24 '11 at 6:18
It's not working, it's displaying empty , that nothing is shared, when I try to connect from windows. – User1234 Oct 24 '11 at 7:24

On Snow Leopard it's /System/Library/LaunchDaemons/smbd.plist

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.