Startup

David Bannon D.Bannon at latrobe.edu.au
Tue Jul 4 23:08:42 GMT 2000


At 03:44 AM 05/07/2000 +1000, Mike wrote:

>My latest installation using SAMBA in an NT domain is working well. I
>have one very flukey problem.. I am using using Linux (RedHat dist 6.2)
>and the latest stable SAMBA (.07). I have an NT box as the PDC, for now,
>and a Linux file server with SAMBA and 70 clients.  The clients are a
>mixed bag including older windows 95 clients. Security is domain. It
>seems where and how I start SAMBA makes a difference on the '95 logons.
>My question then is...
>
>Is there a preferred method for bring SAMBA up on boot? How to start,
>what parameters and in what sequence?

The proper way to do it is to have an 'S' call to your startup script in
/etc/rc.d/rc3.d (and the 'K' ones too). Or you can be really lazy and just
put 

/usr/local/sbin/samba start

in /etc/rc.d/rc.local

where the script in /usr/local/sbin/samba is an appropriate startup script.
Ther are lots of versions around of suitable scripts. I use the following
(based on origional RH stuff I think) :

#!/bin/sh
#

# See how we were called.
case "$1" in
  start)        echo -n "Starting SMB services: "
        daemon /usr/local/samba/bin/smbd -D
        daemon /usr/local/samba/bin/nmbd -D
        echo
        touch /var/lock/subsys/smb
        ;;
  stop)
        echo -n "Shutting down SMB services: "
        killproc smbd
        killproc nmbd
        rm -f /var/lock/subsys/smb
        echo ""
        ;;
  who)
        /usr/local/samba/bin/smbstatus -b
        ;;
  pw)
        vi /usr/local/samba/private/smbpasswd
        ;;
  conf)
        vi /usr/local/samba/lib/smb.conf
        ;;
  status)
        status /usr/local/samba/bin/smbd
        status /usr/local/samba/bin/nmbd
        ;;
  restart)
        echo -n "Restarting SMB services: "
        $0 stop
        $0 start
        echo "done."
        ;;
  *)
        echo "Usage: smb {start|stop|restart|status|conf|who|pw}"
        exit 1
esac



The only important thing about how you start it is that it must be started
as a daemon. 

David
------------------------------------------------------------
David Bannon                      D.Bannon at latrobe.edu.au
School of Biochemistry            Phone 61 03 9479 2197
La Trobe University, Plenty Rd,   Fax   61 03 9479 2467
Bundoora, Vic, Australia, 3083    http://bioserve.latrobe.edu.au
------------------------------------------------------------
..... Humpty Dumpty was pushed !


More information about the samba-ntdom mailing list