TFTP setup

ok, I configured inetd.conf so that the tftp string
is not commented out, but I cannot get the process to start.
I'm running Solaris 5.8 and need some help.
Cabletron said that it's process is 3485, i tried to kill it, it's the wrong process. I started inetd again and still can't kill it.
i created a a directory in etc called tftp (/etc/tftp)
Any ideas? it's not up and running

When you say "its not up and running", do you mean tftp or inetd? If you modify your inetd.conf you need to restart inetd. Find its process number using ps(1) and then do a:
kill -HUP <I>Process_ID</I>

Test it by typing:
tftp <I>hostname</I>
get <I>filename</I>

where filename is some file you have avilable in the tftp directory. See the tftpd man page for more information.

I mean that Tftp is not running, i can use the internet just fine, i think that is the qualification for Inetd to be working, i guess I could be wrong.
I read that inetd's process ID is 3845, i try to kill it and well, it won't die...i also trie kill -HUP inetd that too does not work
i'm not sure if I installed it right, I made a tftp directory /tftp out of / and how do I make that the default tftp directory.

Please upload a copy of your inetd.conf file.

#ident "@(#)inetd.conf 1.44 99/11/25 SMI" /* SVr4.0 1.5 /
# Configuration file for inetd(1M). See inetd.conf(4).
# To re-configure the running inetd process, edit this file, then
# send the inetd process a SIGHUP.
# Syntax for socket-based Internet services:
# <service_name> <socket_type> <proto> <flags> <user> <server_pathname> <args>
# Syntax for TLI-based Internet services:
# <service_name> tli <proto> <flags> <user> <server_pathname> <args>
# IPv6 and inetd.conf
# By specifying a <proto> value of tcp6 or udp6 for a service, inetd will
# pass the given daemon an AF_INET6 socket. The following daemons have
# been modified to be able to accept AF_INET6 sockets
# ftp telnet shell login exec tftp finger printer
# and service connection requests coming from either IPv4 or IPv6-based
# transports. Such modified services do not normally require separate
# configuration lines for tcp or udp. For documentation on how to do this
# for other services, see the Solaris System Administration Guide.
# You must verify that a service supports IPv6 before specifying <proto> as
# tcp6 or udp6. Also, all inetd built-in commands (time, echo, discard,
# daytime, chargen) require the specification of <proto> as tcp6 or udp6
# The remote shell server (shell) and the remote execution server
# (exec) must have an entry for both the "tcp" and "tcp6" <proto> values.
# Ftp and telnet are standard Internet services.
ftp stream tcp6 nowait root /usr/sbin/in.ftpd in.ftpd
telnet stream tcp6 nowait root /usr/sbin/in.telnetd in.telnetd
# Tnamed serves the obsolete IEN-116 name server protocol.
name dgram udp wait root /usr/sbin/in.tnamed in.tnamed
# Shell, login, exec, comsat and talk are BSD protocols.
shell stream tcp nowait root /usr/sbin/in.rshd in.rshd
shell stream tcp6 nowait root /usr/sbin/in.rshd in.rshd
login stream tcp6 nowait root /usr/sbin/in.rlogind in.rlogind
exec stream tcp nowait root /usr/sbin/in.rexecd in.rexecd
exec stream tcp6 nowait root /usr/sbin/in.rexecd in.rexecd
comsat dgram udp wait root /usr/sbin/in.comsat in.comsat
talk dgram udp wait root /usr/sbin/in.talkd in.talkd
# Must run as root (to read /etc/shadow); "-n" turns off logging in utmp/wtmp.
uucp stream tcp nowait root /usr/sbin/in.uucpd in.uucpd
#Tftp service is provided primarily for booting. Most sites run this
# only on machines acting as "boot servers."
tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot
# Finger, systat and netstat give out user information which may be
# valuable to potential "system crackers." Many sites choose to disable
# some or all of these services to improve security.
finger stream tcp6 nowait nobody /usr/sbin/in.fingerd in.fingerd
#systat stream tcp nowait root /usr/bin/ps ps -ef
#netstat stream tcp nowait root /usr/bin/netstat netstat -f inet
# Time service is used for clock synchronization.
time stream tcp6 nowait root internal
time dgram udp6 wait root internal
# Echo, discard, daytime, and chargen are used primarily for testing.
echo stream tcp6 nowait root internal
echo dgram udp6 wait root internal
discard stream tcp6 nowait root internal
discard dgram udp6 wait root internal
daytime stream tcp6 nowait root internal
daytime dgram udp6 wait root internal
chargen stream tcp6 nowait root internal
chargen dgram udp6 wait root internal
# RPC services syntax:
# <rpc_prog>/<vers> <endpoint-type> rpc/<proto> <flags> <user> \
# <pathname> <args>
# <endpoint-type> can be either "tli" or "stream" or "dgram".
# For "stream" and "dgram" assume that the endpoint is a socket descriptor.
# <proto> can be either a nettype or a netid or a "
". The value is
# first treated as a nettype. If it is not a valid nettype then it is
# treated as a netid. The "*" is a short-hand way of saying all the
# transports supported by this system, ie. it equates to the "visible"
# nettype. The syntax for <proto> is:
# |<nettype|netid>|<nettype|netid>{[,<nettype|netid>]}
# For example:
# dummy/1 tli rpc/circuit_v,udp wait root /tmp/test_svc test_svc
# Solstice system and network administration class agent server
100232/10 tli rpc/udp wait root /usr/sbin/sadmind sadmind
# Rquotad supports UFS disk quotas for NFS clients
rquotad/1 tli rpc/datagram_v wait root /usr/lib/nfs/rquotad rquotad
# The rusers service gives out user information. Sites concerned
# with security may choose to disable it.
rusersd/2-3 tli rpc/datagram_v,circuit_v wait root /usr/lib/netsvc/rusers/rpc.rusersd rpc.rusersd
# The spray server is used primarily for testing.
sprayd/1 tli rpc/datagram_v wait root /usr/lib/netsvc/spray/rpc.sprayd rpc.sprayd
# The rwall server allows others to post messages to users on this machine.
walld/1 tli rpc/datagram_v wait root /usr/lib/netsvc/rwall/rpc.rwalld rpc.rwalld
# Rstatd is used by programs such as perfmeter.
rstatd/2-4 tli rpc/datagram_v wait root /usr/lib/netsvc/rstat/rpc.rstatd rpc.rstatd
# The rexd server provides only minimal authentication and is often not run
#rexd/1 tli rpc/tcp wait root /usr/sbin/rpc.rexd rpc.rexd
# rpc.cmsd is a data base daemon which manages calendar data backed
# by files in /var/spool/calendar
# Sun ToolTalk Database Server
100083/1 tli rpc/tcp wait root /usr/dt/bin/rpc.ttdbserverd rpc.ttdbserverd
# UFS-aware service daemon
#ufsd/1 tli rpc/
wait root /usr/lib/fs/ufs/ufsd ufsd -p
# Sun KCMS Profile Server
100221/1 tli rpc/tcp wait root /usr/openwin/bin/kcms_server kcms_server
# Sun Font Server
fs stream tcp wait nobody /usr/openwin/lib/ fs
# CacheFS Daemon
100235/1 tli rpc/tcp wait root /usr/lib/fs/cachefs/cachefsd cachefsd
# Kerberos V5 Warning Message Daemon
100134/1 tli rpc/ticotsord wait root /usr/lib/krb5/ktkt_warnd ktkt_warnd
# Print Protocol Adaptor - BSD listener
printer stream tcp6 nowait root /usr/lib/print/in.lpd in.lpd
# GSS Daemon
100234/1 tli rpc/ticotsord wait root /usr/lib/gss/gssd gssd
# AMI Daemon
100146/1 tli rpc/ticotsord wait root /usr/lib/security/amiserv amiserv
100147/1 tli rpc/ticotsord wait root /usr/lib/security/amiserv amiserv
# OCF (Smart card) Daemon
100150/1 tli rpc/ticotsord wait root /usr/sbin/ocfserv ocfserv
dtspc stream tcp nowait root /usr/dt/bin/dtspcd /usr/dt/bin/dtspcd
100068/2-5 dgram rpc/udp wait root /usr/dt/bin/rpc.cmsd rpc.cmsd

Please upload the results of:

ls -ld /tftpboot

And also:

ls -l /usr/sbin/in.tftpd

# ls -ld /tftpboot
lrwxrwxrwx 1 root other 9 Dec 5 11:02 /tftpboot -> /etc/tftp

# ls -l /usr/sbin/in.tftpd
-r-xr-xr-x 1 root bin 22604 Jan 5 2000 /usr/sbin/in.tftpd

Thanks. Please upload the results of:

ls -ld /etc/tftp

# ls -ld /etc/tftp
drwxr-xr-x 2 root other 512 Dec 5 11:02 /etc/tftp

i am doing all of this from
would it matter what kind of shell i am in?

Shell is just fine. Can you sucessfully move a file or fine error messages (locally) using these commands?

tftp localhost

You should get a prompt for tftp:


Try putting a file like this:

tftp localhost
tftp> ?

Commands may be abbreviated.  Commands are:

connect         connect to remote tftp
mode            set file transfer mode
put             send file
get             receive file
quit            exit tftp
verbose         toggle verbose mode
trace           toggle packet tracing
status          show current status
binary          set mode to octet
ascii           set mode to netascii
rexmt           set per-packet retransmission timeout
timeout         set total retransmission timeout
?               print help information
tftp> put /etc/services

What happens? Do you get a 'transfer time out' error?

[Edited by Neo on 12-06-2000 at 03:11 PM]

all if fine up untill I get to the put statement
tftp> put /etc/services
tftp: services: No such file or directory

this is where I am stuck, not really sure how I have it all setup.

From the man page:

cd in the /etc/tftp directory and touch a file called services. i.e.:

cd /etc/tftp
touch services
chmod 666 services

Now you have a file in the tftp directory with full public read/write permissions per the man-page quote above.

Again, try to tftp to localhost and get this file and put this file.

What happens?


Make sure you are in the /tmp directory when "getting" test files so you do not overwrite good files. For example, testing /etc/services (as an example), don't get the test file and overwrite the /etc/services file by doing the tftp from the /etc directory! Make sure you cd to /tmp before issueing the tftp command.

[Edited by Neo on 12-06-2000 at 04:16 PM]

ok all of the above worked, so I am logged into tftp localhost, and what do I do now, do i put a file? or do I get a file? how do I get a list of what files are avaible for me to get?

The man pages are pretty clear here. You can only get and put files that exist in the tftp directory (and have proper permissions). Did you do everything in the examples above? If you did, you are all set to tftp all you want.

As to what you are going to tftp, that is really up to you. Why did you install it?

i'm installing tftp because I work for the networking dept here and we have a very secure unix box downstairs that has a tftp server and has the final back up's of all our ios' on our cisco's switches. I wanted a more lienant server that I ran so that we could put temp files and ios' that we were still playing with first before we put it on the more secure on downstairs.

it's pretty much just for back up purposes of our switches

This is what I guessed, backup of Cisco IOS and/or Cisco config files. That is precisely where my expertise in TFTP originates :slight_smile:

To backup the IOS, you will have to touch a file (and give open permissions) to the same name of the file you are saving. When you do a 'write net' on the Cisco boxes, it will ask for the name/ip of the TFTP server AND the name of the file (the Cisco IOS gives a default). That file MUST exist in the TFTP directory of the server.

So before you do a 'write net' you much touch a file with the same name as the file you are writing. For example, on the server:

cd /etc/tftp
touch cisco-ios-dec-05-v11.03a
chmod 666 cisco-ios-dec-05-v11.03a

On the router you would then 'write net' file name, cisco-ios-dec-05-v11.03a. (use your own file names). The confusion most people have is that the file must exist in the TFTP directory in order to write it from a device, like the Cisco IOS. To read the file (get), you must know the exact name of the file you are 'getting'. Same is true for Cisco configurations:

cd /etc/tftp
touch router-bigmomma-new-access-lists-dec-06
chmod 666 router-bigmomma-new-access-lists-dec-06

I forget the exact Cisco syntax, so if you need help in that area, please login to the router from an X or other GUI telnet session and use the mouse to capture the screen (Cisco console) and upload to this thread. I can help you through the 'write net' and other commands between the Cisco IOS and your UNIX TFTP platform.

[Edited by Neo on 12-07-2000 at 06:35 PM]