Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Starting Apple Filesharing via the Terminal?

Starting Apple Filesharing via the Terminal?
Thread Tools
Professional Poster
Join Date: Oct 2001
Status: Offline
Reply With Quote
Oct 23, 2004, 03:29 PM
 
How do I start/stop AFP using the terminal?
     
Professional Poster
Join Date: Oct 2001
Status: Offline
Reply With Quote
Oct 23, 2004, 05:26 PM
 
Well, one way I found out is to run 'AppleFileServer' as root, but I'd much prefer to be able to start it with administrative user instead, and I don't see why it requires root when I can start it without typing in a password in System Preferences.

Any other way?
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Oct 23, 2004, 07:06 PM
 
I just started it with my admin user. You can't?
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Professional Poster
Join Date: Oct 2001
Status: Offline
Reply With Quote
Oct 23, 2004, 09:41 PM
 
Originally posted by Chuckit:
I just started it with my admin user. You can't?
Nope

The man pages say it needs to be started by root too though... Did you do anything special to your system?
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Oct 24, 2004, 12:57 AM
 
Ah, my mistake. I figured it would die immediately, but apparently it starts up and shuts off after a few seconds.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Mac Elite
Join Date: Mar 2001
Location: Minneapolis, MN
Status: Offline
Reply With Quote
Oct 24, 2004, 11:14 AM
 
Just do sudo -s first.
     
Professional Poster
Join Date: Oct 2001
Status: Offline
Reply With Quote
Oct 24, 2004, 04:52 PM
 
Originally posted by awaspaas:
Just do sudo -s first.
well that's the thing, I don't want to have to type in the password. But I solved the problem. I wanted to start the server automatically using a crontab, and so I just put the command in the system crontab.
     
Mac Elite
Join Date: Mar 2001
Location: Minneapolis, MN
Status: Offline
Reply With Quote
Oct 24, 2004, 09:22 PM
 
Maybe I'm ignorant, but why do you need to consistently start the server in the crontab? What's wrong with leaving it on?
     
Professional Poster
Join Date: Oct 2001
Status: Offline
Reply With Quote
Oct 24, 2004, 09:30 PM
 
Originally posted by awaspaas:
Maybe I'm ignorant, but why do you need to consistently start the server in the crontab? What's wrong with leaving it on?
I want it on for a brief period of time during one day of the week only
     
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status: Offline
Reply With Quote
Jan 9, 2006, 06:54 PM
 
I tried running this AppleScript:
Code:
tell application "Finder" do shell script "/usr/sbin/AppleFileServer -l myusername -p mypassword" end tell
but it didn't appear to work. Filesharing is still checked "on" in the System Preferences. What am I missing?
(Last edited by selowitch; Jan 11, 2006 at 01:48 PM. )
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:56 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2