The
inetd daemon is a Unix system's Internet "super daemon." It listens on TCP ports defined in
/etc/services and executes the appropriate program for each port, which is defined in
/etc/inetd.conf. The advantage of this scheme is that you can have a large number of daemons ready to answer queries, but they don't all have to be running. Instead, the
inetd daemon listens in places of all the others. The penalty is a small overhead cost of creating a new daemon process, and the fact that you need to edit two files rather than one to set things up. This is handy if you have only one or two users or your machine has too many daemons already. It's also easier to perform an upgrade without disturbing an existing connection.
If you wish to start from
inetd, first open
/etc/services in your text editor. If you don't already have them defined, add the following two lines:
netbios-ssn 139/tcp
netbios-ns 137/udp
Next, edit
/etc/inetd.conf. Look for the following two lines and add them if they don't exist. If you already have
smbd
and
nmbd
lines in the file, edit them to point at the new
smbd and
nmbd you've installed. Your brand of Unix may use a slightly different syntax in this file; use the existing entries and the
inetd.conf
manual page
as a guide:
netbios-ssn stream tcp nowait root /usr/local/samba/bin/smbd smbd
netbios-ns dgram udp wait root /usr/local/samba/bin/nmbd nmbd
Finally, kill any
smbd or
nmbd processes and send the
inetd process a hangup (HUP) signal. (The
inetd daemon rereads its configuration file on a HUP signal.) To do this, use the
ps
command to find its process ID, then signal it with the following command:
#
kill -HUP process_id
After that, Samba should be up and running.