Do you have a Win 2000/2003 Active Directory or NT4 domain? I'd recommend
setting up samba to act as a domain member if so. One of the main things
you have to do is create two scripts that samba can use to automatically
create local unix users and groups.

You could try throwing deadtime = 0 into your smb.conf, but this is the
default. 0 means Samba will not disconnect the client. This was a 2.0
option, I don't know if it carried to samba 3 though.

I'm running Samba on Debian Sarge (testing/unstable) on a 2.4 kernel and
don't have any issues with clients disconnecting. Both the clients and my
samba server are part of Active Directory though. At home, My WinXP box
never disconnects from my Samba server (again Debian Sid), neither box is
on a domain.

To run samba as part of a domain you NEED add user and add group scripts
Samba does not include them, you have to write your own. Thankfully they
are really simple to make. Really, you should be able to call Debian's
adduser and addgroup scripts directly from samba but I never got it to
work with command the line switches needed, so I just made the scripts.

under [global], you add something like this:

        add user script = /usr/local/sbin/add_smb_user.sh %u
        delete user script = /usr/sbin/userdel %u
        add group script = /usr/local/sbin/add_smb_group.sh %g
        delete group script = /usr/sbin/groupdel %g
        add user to group script = /usr/sbin/adduser %u %g
        delete user from group script = /usr/sbin/deluser %u %g

add_smb_group.sh
(actually I think I stole this one from the samba mailing list):
#!/bin/bash

# Add the group using normal system groupadd tool.
addgroup smbtmpgrp00

thegid=`cat /etc/group | grep smbtmpgrp00 | cut -d ":" -f3`

# Now change the name to what we want for the MS Windows networking end
cp /etc/group /etc/group.bak
cat /etc/group.bak | sed "s/smbtmpgrp00/$1/g" > /etc/group

# Now return the GID as would normally happen.
echo $thegid
exit 0


add_smb_user.sh
(this one I definitly wrote....I think...I might have been drinking at the
time...):
#!/bin/bash
###
# A script to automatically create a UNIX user account for
# any Active Directory users who connect to the server.
###
# Find useradd
ADDUSER=`which useradd`
# Options to pass to useradd
ADDUSEROPTS="-c ADUser -g 108 -s /bin/false -d /home/adsamba"

exec ${ADDUSER} ${ADDUSEROPTS} ${1}

Quick note there, I don't use my Samba server to serve home directories,
so everyone has the same home directory. You could use a NOHOME option I
suppose, but I'm sure I had a reason for doing it that way even if I can't
recall what it is now. If you're using Samba to serve up home directories,
modify that part of ADDUSEROPTS to suit your needs.

Now if you're not using a Domain, I'm going to have to dig for
information.

Andrew S. Zbikowski | http://www.ringworld.org
 A password is like your underwear; Change it
 frequently, don't share it with others, and
     don't ask to borrow someone else's.


_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
Help beta test TCLUG's potential new home: http://plone.mn-linux.org
Got pictures for TCLUG? Beta test http://plone.mn-linux.org/gallery
tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list