 |
 |
Starting Apple Filesharing via the Terminal?
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Status:
Offline
|
|
How do I start/stop AFP using the terminal?
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Status:
Offline
|
|
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
|
|
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
|
|
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
|
|
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
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Status:
Offline
|
|
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
|
|
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
|
|
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
|
|
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.
)
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|