Enable file sharing with SMB enabled...

Wanted to know if it was possible to enable file sharing and enable SMB through applescript or command line? I have found:

do shell script "/bin/launchctl load -w " & "/System/Library/LaunchDaemons/com.apple.AppleFileServer.plist" with administrator privileges

To enable AFP file sharing and haven’t found a way to turn on SMB. Any help would be greatly appreciated.

Also I guess I am unaware how to enable file sharing on a folder when it is created.

Hi,

SMB is smbd.plist.

There is an easy way to identify the daemon plist files.
Open /System/Library/LaunchDaemons/ in Finder, sort the view by modification date and change the status in the Sharing PrefPane.

Thanks. And great tip as well.