Ethernet/internet not working after delete of home directory

Joined
Feb 1, 2010
Messages
5
Reaction score
0
Points
1
Hello,

I'm new to Mac (OSX 10.5.8). Yesterday, I tried to delete a folder named "~" which was mistakenly created in my home directory. As such, I ran the command "rm -R ~" in the Terminal from the home directory, but unfortunately this command cleaned my home directory instead of only the folder named "~" inside of it.
The issue is that since then I cannot connect to the internet using my ethernet interface. I've tried to create another account, run Network diagnostics, add a new ethernet location, but none of this works.

Can you help me?

Regards,
Mário
 
Joined
Jan 12, 2009
Messages
1,096
Reaction score
19
Points
38
Location
Prague, Czech Republic
Your Mac's Specs
2,4Ghz 15" unibody
of course it cleaned your entire home directory and everything in it ... the "~" symbol means "home directory" and you recursively deleted everything ... nice one dude :)

you would have to use the command "rm -R ./~" to delete the ~ directory in your home folder
(I had to try this out for myself, not a good feeling hitting that return key lol)

anyway, by deleting a home folder of a user, although you loose all your data, you should be able to create a new working account

Network diagnostics won't really help you, you need to set up your network again for that specific account, e.g. if you have encryption
 
OP
M
Joined
Feb 1, 2010
Messages
5
Reaction score
0
Points
1
Hi,
how/where can I set up the network for that account?
I went to "Network" under "System Preferences" and selected Ethernet with Using DHCP,
it then gets an IP and the remaining fields, but still I cannot go to the Internet ...
Am I missing something? (I've also tried to do this with a new account but it didn't work too...)

Thanks
Mário
 
Joined
Apr 7, 2009
Messages
3,308
Reaction score
58
Points
48
Location
Whangarei NZ
Your Mac's Specs
27 iMac+Thunderbolt, iMac 21,
Hi Mario, seems a good time to review your back up policy. Having a bootable back up would have meant doing a restore and starting over.
Check out McBies comments here.
Meantime you may download and install this which might sort your current issue, but as far as finding data deleted by terminal - someone else will have to answer that.
 
OP
M
Joined
Feb 1, 2010
Messages
5
Reaction score
0
Points
1
Hello,

yes, I agree that's a good time to check my backups.

Anyway, I managed to recover important data (at least that I am aware of),
yet I cannot get valid IP address from DHCP. For example, if I boot from the Windows Vista partition I get one valid IP address from DHCP, but when I boot from OSX I get a different IP address from DHCP. So, what I do is to start Vista, get its IP address, then reboot OSX and manually set it with Vista's IP address, but this is only a workaround.

Do you know what is happening here? This only started to happen when I accidentally deleted my home directory ...

Regards,
Mário
 
C

chas_m

Guest
Yes, I think I know what's happening with your internet connection.

When you wiped your home directory, you also wiped your settings. Your Windows settings were untouched by this, so they are still working.

If you would power down (unplug) your modem and your router, wait about 1 minute, then plug them back in (modem first, wait 30 seconds, then router) the problem would resolve itself.

Let us know if that works!
 
Joined
Jan 12, 2009
Messages
1,096
Reaction score
19
Points
38
Location
Prague, Czech Republic
Your Mac's Specs
2,4Ghz 15" unibody
Is there any security on your wifi? Since you lost your Keychain you lost your WPA password and so on ... so if you do have any kind of security measures on your wifi access point, you need to set those first
 
OP
M
Joined
Feb 1, 2010
Messages
5
Reaction score
0
Points
1
Hi,

I'm not using wifi, only the ethernet card. And presently, I have no access to the router to turn it off, and even so, that action would affect many other people, so I don't think that is possible ...

But, isn't there any way to try one of these?

Option A) reset all ethernet settings to factory (or system installation) default, and then create an ethernet connection;

or Option B) configure OSX to contact a particular DHCP (given an IP address) to get an IP address for my card (I know the IP address of the DHCP that Windows Vista is connecting to, but don't know that of the DHCP OSX is contacting, and I really doubt if they are the same; or just something else is going on inside OSX that I don't know).

Is it possible to do one or both of these options? If yes, how?

Regards,
Mário
 
OP
M
Joined
Feb 1, 2010
Messages
5
Reaction score
0
Points
1
Hello,

finally, I resolved this issue. There were two ways (at least) to resolve it.

One way was to write the IP address of one of the DNS servers into that same field in the "Network" preferences dialog. With this setting, OSX somehow did find the right DHCP to contact. This might seem strange (for me it is), but it did work!

Another way was to turn off the wireless router in my room, which I suspected OSX was getting the IP address for the ethernet card from (yes, the ethernet card?!). After turned it off, OSX contacted the correct DHCP and got a valid IP address. Afterwards, even with the wireless router running, OSX always retrieves IP addresses from the right DHCP.

Summarizing, it seems that OSX retains information somewhere in the home directory about the first DHCP it is able to get an IP address from and stays always with that DHCP as long as it responds. Once I disconnected the wireless router, OSX was unable to contact that router's DHCP, and so, it acknowledge the response from the right DHCP, and wrote it in my home directory.

I hope this experience is of help to others.

Thanks for all your responses,
Mário
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top