SAMBA startup script.

Joris Piepers joris.piepers at gmail.com
Wed Feb 21 11:05:41 PST 2007


I'm not sure if it is the right place to ask these questions;
but when I start Samba I get:

Stopping smbd...                                                    [ OK  ]
Stopping nmbd...                                                    [FAILED]
Starting nmbd...                          Already running     [ ATTN ]
Starting smbd...                                                     [ OK  ]

Also when I close LFS-6.2 it still keeps hanging on this failure.

This is my samba script:

#!/bin/bash
source /etc/sysconfig/rc
source $rc_functions
case "$1" in
                 start)
                 echo "Starting nmbd..."
                 loadproc /usr/sbin/nmbd -D
                 echo "Starting smbd..."
                 loadproc /usr/sbin/smbd -D
                 ;;
         stop)
                 echo "Stopping smbd..."
                 killproc /usr/sbin/smbd
                 echo "Stopping nmbd..."
                 killproc /usr/sbin/nmbd
                 ;;
         reload)
                 echo "Reloading smbd..."
                 reloadproc /usr/sbin/smbd
                 echo "Reloading nmbd..."
                 reloadproc /usr/sbin/nmbd
                 ;;
         restart)
                 $0 stop
                 sleep 1
                 $0 start
                 ;;
         status)
                 statusproc /usr/sbin/nmbd
                 statusproc /usr/sbin/smbd
                 ;;
         *)
                 echo "Usage: $0
{start|stop|reload|restart|status}"
                 exit 1
                 ;;
esac

In the directory /var/run the pid is not removed. After executing
/etc/rc.d/init.d/samba stop

Stopping smbd...                                                    [ OK  ]
Stopping nmbd...                                                    [FAILED]
Starting nmbd...                          Already running     [ ATTN ]
Starting smbd...                                                     [ OK  ]

ls -l /var/run | grep nmbd
-rw-r--r--    1 root     root           21 Feb 11:42 nmbd.pid

Once I run the script the second time the shut down of NMBD and SMBD
work properly. This is every time I run it twice. But in between the
shut down fails like before.

Unfortunately there is no much of a failure log for Samba, the only
thing it also spits out is   something like:

can't find administrators group
can't create root account
can't find users group
can't create users account

What I figured out, this failure is because I do not run LDAP. Instead
I run a Windows Domain. But it is not properly set up yet. It doesn't
matter I think because the accounts are stored within samba instead.
Or is it connected with the shutdown failure somehow? It feels like it
is because of the  shutdown/ samba script. But I do not how/ why? I
hope someone has experience with it? I'm running LFS 6.2 and BLFS
latest development version...

Google didn't gave any solutions. Does anyone have had the same issues before?
Thanks in advance,

Joris



More information about the blfs-support mailing list