WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Newbie - save SSH and ifconfig settings  (Read 4715 times)

Offline trout1

  • Newbie
  • *
  • Posts: 5
Newbie - save SSH and ifconfig settings
« on: July 13, 2010, 11:35:58 AM »
Apologize for the (hopefully) easy question:

My IP address config (DHCP vs static) keeps changing.  As well, the SSH server will not stay on.  This is without rebooting the system or configuring anything.  As well, I lost a user I added and the tc user password changed.

My guess is that it's one of the modes I need to change or add to the optlist.  I would be less surprised about this if this was on reload.

My .filetool.lst has:
opt/bootlocal.sh
opt/.tcrc
opt/.backgrounds
opt/.filetool.lst
opt/.xfiletool.lst
home/tc
etc/init.d/dropbear
home/tc/.IOL
opt/eth0.sh



Disclaimer:  Very new to linux, and a lot of the FAQ is over my head.  I received a VM of this with some built-in apps I need to use which are difficult to rebuild, so I really would like to stay on TC despite being over my head.  Running on ESXi 4.0. 


Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Newbie - save SSH and ifconfig settings
« Reply #1 on: July 13, 2010, 11:45:06 AM »
You forgot to add
etc/dropbear
etc/shadow

Offline trout1

  • Newbie
  • *
  • Posts: 5
Re: Newbie - save SSH and ifconfig settings
« Reply #2 on: July 13, 2010, 12:01:29 PM »
Thanks for the help.  Just added these, we'll see what it looks like.

When I click the backup button, should I use hda/ by default, or is there someplace I should check to make sure that's the right file system?

What function in the OS is clearing the settings without a reload?  That is what was most confusing.

Offline trout1

  • Newbie
  • *
  • Posts: 5
Re: Newbie - save SSH and ifconfig settings
« Reply #3 on: July 13, 2010, 01:05:22 PM »
I still lost my static IP address config, and DHCP is still being turned on. 

Any idea which file/directory needs to be saved for this? 

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Newbie - save SSH and ifconfig settings
« Reply #4 on: July 13, 2010, 01:08:29 PM »
If a server won't stay on, it's either stopped by something or it never starts (config error?).
The only barriers that can stop you are the ones you create yourself.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Newbie - save SSH and ifconfig settings
« Reply #5 on: July 13, 2010, 01:24:52 PM »
What is the contents of /opt/eth0.sh?
Did you run the Network Wizzard in th cpanel?

Offline thane

  • Hero Member
  • *****
  • Posts: 697
Re: Newbie - save SSH and ifconfig settings
« Reply #6 on: July 13, 2010, 02:12:57 PM »
A little OT, and correct me if I'm wrong:

opt/.backgrounds should be opt/backgrounds/

backgrounds is a directory I believe.

Offline batnas

  • Full Member
  • ***
  • Posts: 122
Re: Newbie - save SSH and ifconfig settings
« Reply #7 on: July 13, 2010, 02:40:46 PM »
opt/.backgrounds should be opt/backgrounds/

You can have folder starting with a . too


Also, you might want to remove etc/init.d/dropbear - it is the executable you use to start dropbear, and thereby unlikely to change

Offline trout1

  • Newbie
  • *
  • Posts: 5
Re: Newbie - save SSH and ifconfig settings
« Reply #8 on: July 13, 2010, 04:46:16 PM »
This doesn't really make sense to me:

tc@box:/opt$ cat eth0.sh
#!/bin/sh
pkill udhcpc
ifconfig eth0 10.6.120.124 netmask 255.255.255.0 broadcast 10.6.120.255 up
route add default gw 10.6.120.1
echo nameserver 10.6.120.1 > /etc/resolv.conf


tc@box:/opt$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:56:BF:39:C3
          inet addr:10.6.120.4  Bcast:10.6.120.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3919 errors:0 dropped:0 overruns:0 frame:0
          TX packets:91 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:323384 (315.8 KiB)  TX bytes:10769 (10.5 KiB)
          Interrupt:18 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:332 (332.0 B)  TX bytes:332 (332.0 B)

tc@box:/opt$


It really does seem like some process is killing other processes without a reboot. 

When I inherited this VM, they had set up DHCP and for a .bat script to be run automatically.  It's not in bootlocal.sh, and I'm not sure where else it may be.

Offline trout1

  • Newbie
  • *
  • Posts: 5
Re: Newbie - save SSH and ifconfig settings
« Reply #9 on: July 13, 2010, 05:36:22 PM »
Looks like I fixed the issues for the time being.

The trick was my backups were not working.  The VM was storing to /mnt/hda1/myfiles.tgz whereas the OS wanted to store to /mnt/hda1/backup/myfiles.tgz

I also restored the VM from the original state, and was able to find the configuration in /opt/.listfiles and the boot files as well.

Adding the commands into the listfiles and boot file seems to have done the trick, plus changing the backup location.

Thanks for the help everyone.