User Name
Password
AppleNova Forums » Genius Bar »

Command Line Challenge


Register Members List Calendar Search FAQ Posting Guidelines
Command Line Challenge
Thread Tools
rick1138
New Member
 
Join Date: May 2004
 
2004-07-17, 23:41

As I mentioned in another thread, I have a machine with a dead monitor. I have tried to access files on the machine by networking with a notebook, but apparently file sharing is turned off on the machine with a dead monitor. What I want to do is to boot directly into the command line, and turn on file sharing form there - but remember I have no monitor, so I can't see what I am doing. Does anyone know exactly how to do this? Any advice would be appreciated.
  quote
Ryan
Veteran Member
 
Join Date: May 2004
Location: Promise Land of Trustafarians
 
2004-07-17, 23:47

As I never read that thread, do you mind telling what kind of computer it is, most importantly software?

Or can you borrow a monitor from a friend?

You might try Firewire Target disk mode. Connect the computers using firewire, and then boot the one you want to access up(the one you are going to put the files on should already be running) while holding down the T key, IIRC. This will show it too you as a Firewire HDD.
  quote
thuh Freak
Finally broke the seal
 
Join Date: May 2004
 
2004-07-18, 14:03

well, you are going to have to have very good typing skills. but here goes: restart the computer, and hold down Apple-s for about 3 minutes. normally you would do this just until you can see the command line text startup, but we're blind here. give it a couple more minutes to finish booting into single-user mode. now here's the command you gotta type:
mount -o remount,rw /
cat /etc/hostconfig | sed 's,SSHSERVER=-\(.*\)-,SSHSERVER=-YES-,g' > /tmp/tmp.hc
mv /tmp/tmp.hc /etc/hostconfig
reboot

The part I'm not sure about is the first line. I can't remember if the hd is started out read-write when you login to single user mode. Also, I can't remember if osx uses that remount option like GNU/Linux. And you won't have any way of verifying if this process works, excep to reboot and see if you can ssh in from somewhere else.
  quote
RolandG
New Member
 
Join Date: Jul 2004
 
2004-07-18, 14:34

Why don't you put the machine with the dead screen into FireWire target mode so you can use it like an external harddrive?
  quote
rick1138
New Member
 
Join Date: May 2004
 
2004-07-18, 20:21

Unfortunately only one of my machines has firewire. Thanks for the command, I'm going to try it.
  quote
rick1138
New Member
 
Join Date: May 2004
 
2004-07-18, 20:23

BTW, the other thread is here:

http://forums.applenova.com/showthread.php?t=996
  quote
rick1138
New Member
 
Join Date: May 2004
 
2004-07-19, 22:43

I think what I want to do is to allow file sharing on the computer with the dead monitor. I've tried this on my working machine. The preferences are stored in /Library/Preferences/com.apple.sharing.firewall . If you enable file sharing form the System Preferences > Sharing dialogue by checking Personal File Sharing on the Services tab file sharing is enabled, and the entry "firewall > Personal File Sharing > enable" in the file /Library/Preferences/com.apple.sharing.firewall is changed from 0 to 1.

What I want to do is change it in the Terminal. I have tried typing:

defaults write /Library/Preferences/com.apple.sharing.firewall firewall Personal File Sharing enable 1

and gotten error messages. I have also tried:

defaults write /Library/Preferences/com.apple.sharing.firewall firewall PersonalFileSharing enable 1

and

defaults write /Library/Preferences/com.apple.sharing.firewall firewall Personal_File_Sharing enable 1

which also produced error messages. I have been successful in changing the value of the entry PersonalFileSharing from 0 to 1 by typing:

defaults write /Library/Preferences/com.apple.sharing.firewall PersonalFileSharing 1

but apparently this does not turn file sharing on.

Any help anyone can offer would be appreciated.
  quote
thuh Freak
Finally broke the seal
 
Join Date: May 2004
 
2004-07-19, 23:10

if you can get ssh working, you can use scp to toss files back and forth. did you try that?
  quote
rick1138
New Member
 
Join Date: May 2004
 
2004-07-21, 17:03

No. Guess what? File sharing was on all along on my machine with the dead monitor, the ethrnet jack was just a little loose. Thanks for all the advice everyone, I did learn some cool stuff.
  quote
Gargoyle
http://ga.rgoyle.com
 
Join Date: May 2004
Location: In your dock hiding behind your finder icon!
 
2004-07-21, 17:37

I know you got this working now, but just for completeness... When you are issuing commands in the terminal, you have to watch out for the spaces.

For example:
Some Name With Spaces

Can be written as:
"Some Name With Spaces"

Or:
Some\ Name\ With\ Spaces


Edit: Other example was wrong - trying to be too clever!

OK, I have given up keeping this sig up to date. Lets just say I'm the guy that installs every latest version as soon as its available!

Last edited by Gargoyle : 2004-07-21 at 17:53.
  quote
stoo
Member
 
Join Date: May 2004
 
2004-07-25, 17:27

Is there any way to connect serial terminals to Macs running OS X (other than an XServe) ?
  quote
rick1138
New Member
 
Join Date: May 2004
 
2004-07-26, 12:19

Gargoyle, thanks. I can't get in right now so I am going to have to try going through the Terminal.
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
Project Challenge thuh Freak Third-Party Products 40 2004-06-13 10:14


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 12:24.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova