Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't start smbd and nmbd when loading.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ShaneB
n00b
n00b


Joined: 22 Sep 2003
Posts: 3
Location: Waverly, Iowa

PostPosted: Mon Sep 22, 2003 1:25 am    Post subject: Can't start smbd and nmbd when loading. Reply with quote

I am trying to get samba up and running. I finally got SWAT figured out and it runs so I think xinetd is doing its job. However I go to check the status of smbd and nmbd in SWAT and they are not running. I can start them okay from SWAT and they work.

This is my xinetd.conf:
Code:

# Sample configuration file for xinetd

defaults
{
   only_from      = localhost
   instances      = 60
   log_type       = SYSLOG authpriv info
   log_on_success = HOST PID
   log_on_failure = HOST
   cps            = 25 30
}

includedir /etc/xinetd.d
swat   stream  tcp  nowait.400  root  /usr/sbin/swat  swat
netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd
netbios-ns  dgram  udp wait   root /usr/sbin/nmbd nmbd


These are also turned on in /etc/services

Obviously I am missing something, but what? I have tried everything I can think of, but haven't gotten anywhere.

Shane
Back to top
View user's profile Send private message
cchapman
Guru
Guru


Joined: 16 Jan 2003
Posts: 440
Location: Fremont, NE

PostPosted: Mon Sep 22, 2003 5:36 am    Post subject: Reply with quote

What you showing here

Code:
swat   stream  tcp  nowait.400  root  /usr/sbin/swat  swat
netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd
netbios-ns  dgram  udp wait   root /usr/sbin/nmbd nmbd


is from your inetd.conf

xinetd is different.

there should be files in your /etc/xinet.d/ directory that start and stop scritps
Back to top
View user's profile Send private message
ShaneB
n00b
n00b


Joined: 22 Sep 2003
Posts: 3
Location: Waverly, Iowa

PostPosted: Tue Sep 23, 2003 1:53 am    Post subject: Reply with quote

In /etc/xinetd.d I have:
Code:

shane $ ls /etc/xinetd.d
README.services  chargen-udp  daytime-tcp  echo-tcp  samba  time-tcp
chargen-tcp      cups-lpd     daytime-udp  echo-udp  swat   time-udp


I tried to copy the samba script from the /etc/inetd.d directory and it didn't seem to do anything.

I have no idea how to create the correct script for smbd and nmbd.

This is the samba script I copied over
Code:

#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /home/cvsroot/gentoo-x86/net-fs/samba/files/samba-init,v 1.3 2003/02/14 23:00:14 vapier Exp $

opts="${opts} reload"

depend() {
   need net
   use cupsd
}

start() {
   ebegin "Starting samba"
   start-stop-daemon --start --quiet --exec /usr/sbin/smbd
   result=$?
   start-stop-daemon --start --quiet --exec /usr/sbin/nmbd
   result=$(( $result + $? ))
   eend $result
}

stop() {
   ebegin "Stopping samba"
   start-stop-daemon --stop --quiet --pidfile /var/run/samba/smbd.pid
   result=$?
   start-stop-daemon --stop --quiet --pidfile /var/run/samba/nmbd.pid
   result=$(( $result + $? ))
   eend $result
}

reload() {
   ebegin "Reloading samba"
   killall -HUP smbd &>/dev/null
   result=$?
   killall -HUP nmbd &>/dev/null
   result=$(( $result + $? ))
   eend $result
}


Should I have a script for smbd and nmbd each?

Sorry for the really noob questions, but this is the first thing I have run across where the docs are either not very good or I am missing something.
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Tue Sep 23, 2003 2:18 am    Post subject: Reply with quote

Not familiar with smb through xinetd, but the 'gentoo' way to start these services is like so:

/etc/init.d/samba start

To get it to come up on boot up:

rc-update add samba default
_________________
http://get.a.clue.de
Back to top
View user's profile Send private message
ShaneB
n00b
n00b


Joined: 22 Sep 2003
Posts: 3
Location: Waverly, Iowa

PostPosted: Thu Sep 25, 2003 1:57 am    Post subject: Reply with quote

Thanks
That did the trick.

How do I know when I need to use rc-update when I emerge a package?
Back to top
View user's profile Send private message
warrenj1
Tux's lil' helper
Tux's lil' helper


Joined: 24 Aug 2003
Posts: 84

PostPosted: Thu Sep 25, 2003 3:59 pm    Post subject: Reply with quote

ShaneB wrote:
Thanks
That did the trick.

How do I know when I need to use rc-update when I emerge a package?



there is no good answer to that question because it is all subjective. Any package that you emerge will not automatically load itself with rc-update. It is up to the user to decide what services he wishes to run and when. When you emerge ssh for example this is a package that i added to default because I want to always be able to login to the box remotely. When I emerged webmin I did not run a rc-update because unless I need it at that moment(which is rare since I like command line more for configuring things) I do not want that service running. I rarely use it and when it is constantly running that take up resources(which are very scarce) so I start it and stop it when needed

rule of thumb i guess:
if you have to run "/etc/init.d/<package> start"
to get it running do you always want it on? if so then rc-update it

if not just start it when you need it
_________________
The reasonable man adapts himself to the world; the unreasonable man persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum