Can't access network interfaces anymore [Kinda urgent]


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Can't access network interfaces anymore [Kinda urgent]
# 1  
Old 06-20-2011
Can't access network interfaces anymore [Kinda urgent]

Hello,

I've bought an semi-dedicated (cloud computing) server, but yesterday I had to change my IP, so I tried this with PuTTY:

Went to

/etc/network/interfaces

And changed

iface eth0 inet static

To


iface eth0 inet dhcp

Hoping to get an dynamic IP

Then I restarted my network with:

/etc/init.d/networking restart

And then I lost my connection to the host, I've contacted the support team of the company that hosts it (actually it's hosted in Softlayer, but I've bought it from other vendor, 'cause I'm from Brazil), and he said he tried this:

/etc/network/interfaces:1

in the host computer, but didn't help... He wants to format the computer, but I would lost all my datas, and this is just unthinkable... What could I do, please? I'm desperate!

Thanks... Waiting anxiously for answers...

[I kinda now this isn't the best place to post this, but I'm desperate... Please understand]
# 2  
Old 06-20-2011
If you can't get into it, there's not a lot you can do to it.

If they can get into it, can't they just undo your changes and restart?
# 3  
Old 06-20-2011
So, it seems he can access the file, but even undoing the changes he said it's givin' errors... He sent me this screenshot:

Image

It seems to be the file as it was, without my modifications, he didn't say what error was going on, I'll push him to give me more specific informations

-- UPDATE --

Ok se said he can edit and save the interfaces file, but when he restarts network (/etc/init.d/networking restart) it gives:

Image

I told him to try chmod 777 /etc/network/interfaces

'Cause when I edited interfaces, I've donwloaded it with filezilla, edited and sent back, maybe chmods changed

Last edited by lukinhasb; 06-20-2011 at 12:34 PM..
# 4  
Old 06-20-2011
edited it in what? If you edited it in a windows system you probably filled it with carriage returns, which could cause all sorts of weird syntax errors. They can fix it like

Code:
tr -d '\r' < /etc/whatever > /tmp/$$
cat /tmp/$$ > /etc/whatever
rm -f /tmp/$$

If you saved a copy of the original, that's even better.

And no no no. 777 is not the magic sledgehammer to fix all permissions problems. Do you really want that configuration file to be exectuable?
This User Gave Thanks to Corona688 For This Post:
# 5  
Old 06-20-2011
Ok, it seems he went to lunch, I'll ask him to do this then:

Code:
tr -d '\r' < /etc/network/interfaces > /tmp/$$
cat /tmp/$$ > /etc/network/interfaces
rm -f /tmp/$$
reboot
ifdown -a
ifup -a
/etc/init.d/networking restart

Is there another shot I might try? This seems a logical line of commands to use? Should I ask him to get an interfaces from another server and try paste in there, making the necessary IP changes?

Also, is there a way to upload my server files in case of format needed? (There must be a way, format is just the "easy" way)

-- edit --

There are commands like ipconfig, netstat, route etc that might be useful to solve this? He said this is "unfixable", but nothing in computing is unfixable lol, I need suggestions please

-- edit 2 --

Ok, so I found this on the internet:

Quote:
Hi All

Even as this is a bit an older problem, it just happend to me as well and I think I just found the cure.

The reason for the error is an added linebreak in the file description at the top of the document. I think it's done by Nano when you open the file the first time.

just add a "#" sign at the beginning of line 2 and all is fine.

HTH
Markus
And really, it seems that in line 2 there's something wrong... There is an "i" before #

---------- Post updated at 02:10 PM ---------- Previous update was at 01:04 PM ----------

It worked!

The "i" was before the comment "#", he just deleted it and it worked!!

Thanks a lot for your suggestions!

Last edited by lukinhasb; 06-20-2011 at 01:16 PM..
This User Gave Thanks to lukinhasb For This Post:
# 6  
Old 06-20-2011
I can't believe I didn't notice that! Smilie Glad you got it going without a reformat.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

/etc/network/interfaces

i need a one liner command that writes in /var/log/net.log the date when i connect to the network and when i disconect ..i know that i need to write somethin in /etc/network/interfaces but idk what ! please help (1 Reply)
Discussion started by: g0dlik3
1 Replies

2. Solaris

Telnet access is not available anymore

Hi Folks, My telnet access to the server is not available anymore. I have found that when I execute >telnet IP, the login prompt for username/password entry is not displayed. Cursor blinks in a empty line and I dont see the prompt to enter my username. It hungs in this state and not possible... (1 Reply)
Discussion started by: ekorgur
1 Replies

3. Debian

/etc/network/interfaces problem

Hello i am configuring a debian lenny sever ,/etc/network/interfaces is modified so that eth1 takes a static IP address then i save it wq! then i restart the networking , /etc/init.d/networking restart . but after reboot ,the file is reset ,note that the interfaces had by defauklt IPv6 address... (5 Replies)
Discussion started by: learn82
5 Replies

4. Solaris

Network Interfaces

I got second IOU in my M5000 but not able bring internal network interfcae .. ike i don't get link on those 2 interfaces .. and the same network cable plugged in PCI network card it works like a charm Is there any special way to enable the internal IOU interfaces or i have bad nics ? (8 Replies)
Discussion started by: fugitive
8 Replies

5. Shell Programming and Scripting

how to modify ramdisk size,kinda urgent !!!

Hi all, I wanted to know how to modify the size of the ramdisk? I mean am manipulating a live cd ,for which the file am manipulating is within a ramdisk now due to size constraints i am unable to play around with some stuff.... currently the size of the ram disk is 64M... I would like to... (1 Reply)
Discussion started by: wrapster
1 Replies

6. AIX

NIM w/ two network interfaces

Hi all, this is my first post on this forum. My main problem is this: I have a NIM server that I am trying to configure two interfaces on. One interface is for an internal Admin VLAN, the other is so that the server can use SUMA to pull updates. The problem is that I need help w/ the routing.... (1 Reply)
Discussion started by: snakernetb
1 Replies

7. AIX

NIM w/ two network interfaces

Hi all, this is my first post on this forum. My main problem is this: I have a NIM server that I am trying to configure two interfaces on. One interface is for an internal Admin VLAN, the other is so that the server can use SUMA to pull updates. The problem is that I need help w/ the routing.... (0 Replies)
Discussion started by: snakernetb
0 Replies

8. SCO

Network interfaces problem

Hi, I have problems with my SCO unix network interfaces. Intel integrated adapter was failing, so I installed new one - 3COM adapter into free PCI slot. Installed driver using SCO Software manager - successfully Added new Network adapter using SCO Network configuration manager - successfully... (0 Replies)
Discussion started by: vilius
0 Replies

9. IP Networking

Network interfaces problem

Hi, I have problems with my SCO unix network interfaces. Intel integrated adapter was failing, so I installed new one - 3COM adapter into free PCI slot. Installed driver using SCO Software manager - successfully Added new Network adapter using SCO Network configuration manager - successfully... (0 Replies)
Discussion started by: vilius
0 Replies

10. Solaris

HOW-TO Retrieve all network interfaces??!

Yes. But just wait a bit. How to do it via system calls? I'm just a newbie in Unix\Linux\Solaris e.t.c. programming. Can anyone help me? I need an advice probably how to do it or may be what API to read... :) Please, help... (2 Replies)
Discussion started by: LocalStorm
2 Replies
Login or Register to Ask a Question