Configuration command explanations
cat > /etc/samba/smb.conf << "EOF"
: Create a default Samba configuration file. This configuration will
allow Samba to act as a Primary Domain Controller for a Microsoft
Windows based network. If this is not desired, a simpler default
smb.conf file is bundled with the Samba distribution. See the
samba&samba-version;/examples/smb.conf.default
file. Primary Domain Controller configuration is slightly more
complicated than ordinary member server configuration, so instructions
for PDC configuration will be given here.
cat > /etc/rc.d/init.d/samba <<
"EOF" : Create the Samba boot script, used to start and stop Samba
automatically on machine startup and shutdown.
/usr/sbin/useradd -g 100 -d /dev/null -c \
"Win2k Server" -s /bin/false win2kbox$
This command creates a machine trust account, necessary only for
Windows 2000/NT servers to authenticate to our new PDC. Machine trust
accounts are not necessary for Win95/98 clients.
echo "swat 901/tcp" >> /etc/services : Register the swat service to run on port 901.
echo "swat stream tcp nowait.400 root /usr/sbin/swat swat" >>
/etc/inetd.conf : Instruct inetd where to find and how to
run swat.
ln -s /etc/rc.d/init.d/samba
/etc/rc.d/rc3.d/S600samba etc. : Create the Samba boot scripts, used to start and stop Samba
automatically on machine startup and shutdown.