SAMBA startup script.

Joris Piepers joris.piepers at gmail.com
Tue Feb 27 02:44:28 PST 2007


hello folks,

somehow I could not stop the processes? then I found out I needed to
enter an ID? so I entered pidof smbd
and pidof nmbd
this gave me some ID's I entered those instead and it seemed to work ok.
then I saw processes of LFS are killed using killproc and loaded using loadproc.
however I could not find the files anywhere? is it part of the kernel
somehow? meanwhile I found a package which is called kilproc 2.11.
will this run under LFS or do I have a chance the system will be
destroyed instead of solving this problem by installing this package?

have anyone tried this before? I could not find the package in the
BLFS nor in the LFS documentation. who is writing this documentation
anyway? does someone know if I can contribute to the writers? thanks
in advance for your help. thanks Dan for your suggestions so far, they
are very helpfull as I am a step closer in solving it :)

also I would like to thank Warren you shared your story about it.

On 2/21/07, Dan Nicholson <dbn.lists at gmail.com> wrote:
> On 2/21/07, Joris Piepers <joris.piepers at gmail.com> wrote:
> > 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
>
> I suspect this is a bootscript issue, but I really don't know how the
> samba setup goes. The first question to answer is why nmbd is failing
> to stop. So, instead of executing the bootscript, just shut things
> down manually. Please substitute the right paths if I've gotten them
> wrong.
>
> $ smbd_pid=`cat /var/run/smbd.pid`
> $ kill -TERM $smbd_pid
>
> Did smbd die? Does the pid file still exist?
>
> $ nmbd_pid=`cat /var/run/nmbd_pid`
> $ kill -TERM $nmbd_pid
>
> Did nmbd die? Does the pid file still exist? If it didn't get killed,
> then the pid file shouln't be removed.
>
> If it didn't die, then you might want to restart nmbd from the command
> line without the -D switch. Maybe you should also turn up the
> debugging with -d. Then try the same procedure with `kill -TERM' on
> your running process.
>
> --
> Dan
> --
> http://linuxfromscratch.org/mailman/listinfo/blfs-support
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page
>



More information about the blfs-support mailing list