nmbd for WINS client compatibility

Kenneth Sims ksims at cc.cumber.edu
Wed Feb 17 13:26:01 GMT 1999


At 02:26 PM 2/16/99 , Lauren P. Burka wrote:
>I've been using samba, specifically nmbd, to solve an interesting
>problem, with partial success.  I haven't seen anything else on the
>list about this, but I haven't been looking too hard either.
...rest deleted...

I've got a similar situation here. I have a PS/2 486 serving as a file
repository for my students via samba. It basically just has a couple of
public shares, and a couple dozen user accounts for students to have some
scratch disk space. 
My solution to keeping it available was to write a script that periodically
checks the IP address, and compares it to the previous one. If they are
different, the machine does a 'shutdown -r +0' and restarts, reconfiguring
itself for the new IP address. It's a brute force method that might not
work for your situtation if you have user telnetted in, but since all
access (except for me) to my machine is through Network Neighborhood, it
seems to work pretty well. Is a restart of nmbd all that's necessary?

I also mail the IP address to myself each time the machine reboots.

----ipcheck script begin
touch /usr/local/etc/ipaddr
currentip=`/sbin/ifconfig |grep 192.168 |cut -c21-34`
oldip=`cat /usr/local/etc/ipaddr`

if [ ! $currentip ]
then
    currentip='X'
fi
if [ ! $oldip ]
then
    oldip='Y'
fi
if [ $currentip != $oldip ]
then
    echo 'Rebooted due to inconsistency of IP addresses!' \
             |mailx root -s"IP PROBLEM with BEAMER"
    echo 'Rebooted due to inconsistency of IP addresses!' \
             |mailx ksims at cc.cumber.edu -s"IP PROBLEM with BEAMER"
    /sbin/shutdown -r +0 &
fi
echo $currentip > /usr/local/etc/ipaddr
----ipcheck script end

Ken

#--
# Kenneth Sims               Computer Information Systems
# kenpc at cc.cumber.edu                        606/539-4344
# http://www.cumber.edu/personal/kenpc/


More information about the samba mailing list