TODO: figure out how to change /sbin/init to start inetd
TODO: how do you find out which drive the file was transfered from empeg.csv.
Is it the second to the last number?
TODO: Figure out how to update the Debian image to the latest and greatest.

1) Download the Debian root image from
here
and download stuff.tgz from this attachment.

2) Transfer it with a version of emplode that transfers non-mp3 files. I
put it into Unattached items.

3) Figure out what the files are now named. Ex for the first file:
Export the database
Tools->Export Database to CSV
Edit that file and search for debian-image_990822.tar Ex:
2474,"tune","9651112","debian-image_990822.tar","Unknown","","","","","","","","","","","",1,""
2477,"tune","1003","stuff","Unknown","","","","","","","","","","","",1,""
Start a calculator and multiply that result by 16 and then
convert it into hex. The windows calculator can do this with
View->Scientific. Ex:
9aa0
9ad0

For the rest of the sample, debian-image_990822.tar.gz is /drive0/fids/9aa0
and stuff.tgz is /drive0/fids/9ad0

4) Extract the following from the Debian root image (ftp daemon, ftp, ping,
find, passwd, su, which, and vi). You can delete files afterwards if you
don't want them or you can delete them from filelist before hand.
cd /
rw
rwm
tar -xvzf /drive0/fids/9ad0 tmp/filelist
tar -xvzpf /drive0/fids/9aa0 -T tmp/filelist
chmod +s /bin/su
ln -s /usr/bin/nvi /usr/bin/vi
rm /tmp/filelist

5) For convienience, I have included some files that you have to modify in
stuff.tgz. To replace them, do the following:
tar -xvzf /drive0/fids/9ad0
Here is what is changed in each file
etc/group
This contains valid groups in your system. This file contains root,
ftp, and nobody. Do what ever you want to it if you understand the
format and function of it.
etc/passwd
This contains valid users in your system. This file contains root,
ftp, and nobody. Root and ftp have no passwords. Do what ever you
want to it if you understand the format and function of it.
To change the password for ftp, for example, do the following:
passwd ftp
etc/hosts.deny
This says what hosts are denied. I removed the PARANOID line.
etc/hosts
This says what ip addresses do not need to be DNSed. I added
localhost.

6) Optional: start up the loop-back interface that listens to localhost.
ifconfig lo 127.0.0.1 up

7) Make sure that dns can work. Correct the last line of /etc/resolv.conf
so that it points to a valid dns server. The first line is your default
domain.
vi /etc/resolv.conf
Test is out with
ping www.empeg.com

NOTE: To figure out your DNS server under Windows, type winipcfg. Click
on More Info and use the DNS Servers field. Under Linux, just use
/etc/resolv.conf.

8) Start/Restart the inet daemon. Do a ps -e | grep inetd
If it is running, then there will be at least one line that says only "inetd"
instead of "grep inetd". Ex:
empeg:/# ps -e | grep inetd
38 ? 00:00:00 inetd
empeg:/# kill -HUP 38
Otherwise, just start it up.
inetd

9) Make sure you can become the user ftp. The first su is free since you are
root. The second one asks you for your password.
su nobody
su ftp
ls
logout
logout
NOTE: If you see "su: cannot run /bin/bash: Permission denied", then do the
following. I don't know why there are no permissions for many of the
critical files. I don't remember changing this before.
chmod ugo+rx /lib /lib/*
chmod ugo+rx / /bin /bin/* /etc

10) Test it out!

11) To connect locally (with empeg's environment. Make sure to follow setp 6):
ftp 127.0.0.1

12) To connect within your LAN:
ftp 192.168.1.105

13) Clean up
ro
rom

NOTE: for security reasons, you cannot login as root via ftp.

Special thanks to kim, mcomb and [url=http://www.linuxgazette.com/issue52/okopnik.html]this.

I never thought I would have so many problems with su!




Attachments
2-15005-stuff.tgz (85 downloads)