LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   smbd at boot vs. xinetd start (https://www.linuxquestions.org/questions/linux-networking-3/smbd-at-boot-vs-xinetd-start-206065/)

skippuff54 07-16-2004 08:01 PM

smbd at boot vs. xinetd start
 
i want the smb and nmb daemons to start at boot and not through xinetd. so far, i've:

-deleted smb and nmb files in /etc/xinetd.d
-enabled smbd and nmbd at boot

/etc/services seems to have the proper port designations, and swat tells me that nmbd is running but smbd isn't.

when i attempt to access the network, it tells me "unknown error in stat: network is unreachable"

how can i ensure that these daemons are starting at boot and not competing with instances started by xinetd to listen on ports 137:139

osvaldomarques 07-16-2004 11:29 PM

Did you restart xinetd after removing its configuration files?

skippuff54 07-17-2004 11:37 AM

i restarted the system

osvaldomarques 07-17-2004 01:31 PM

Hi,
If you restarted the system, and there are no more /etc/xinetd.d/smb stuff, xinetd is no more controlling your smb. May be you have a misconfiguration in smb.conf which causes this problem. To confirm both daemons are running, enter
Code:

service smb restart
this will stop smbd and nmbd and start them again. If anyone isn't running, you will see FAILED in the stop phase them if they start ok you will see OK. If you repeat the restart command and the FAILED result appears again, you have a misconfiguration for sure. Samba has a utility to check proper syntax of smb.conf. Its name is "testparm". It has logs also, one for each daemon and one for each client. Possibly its logs will be on "/var/log/samba" directory.

skippuff54 07-17-2004 07:19 PM

i've looked in the logs, but maybe i'm missing something. i'll post those in a little bit.

testparm doesn't return any errors.

skippuff54 07-17-2004 11:04 PM

here's what i've tried in konsole:

SUSEBOX:~ # service smb restart
bash: service: command not found
SUSEBOX:~ # smb restart
bash: smb: command not found
SUSEBOX:~ # smbd restart
SUSEBOX:~ # testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[profiles]"
Processing section "[users]"
Processing section "[groups]"
Processing section "[pdf]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

here is log.smbd

[2004/07/17 04:51:44, 0] smbd/server.c:main(757)
smbd version 3.0.4-SUSE started.
Copyright Andrew Tridgell and the Samba Team 1992-2004
[2004/07/17 04:51:47, 0] smbd/server.c:main(791)
standard input is not a socket, assuming -D option
[2004/07/17 04:51:47, 0] lib/pidfile.c:pidfile_create(84)
ERROR: smbd is already running. File /var/run/samba/smbd.pid exists and process id 2798 is running.

chop 07-17-2004 11:29 PM

chkconfig --level 3 smb on should start samba at boot

skippuff54 07-18-2004 01:21 PM

that didn't do it

osvaldomarques 07-18-2004 05:15 PM

Hi,
I never installed Suse and I had presumed it has some commands inherited from RH. Service is one script in the /sbin directory. However, it just calls scripts located in the "/etc/rc.d/init.d". So when I wrote service smb restart, it's the same as /etc/rc.d/init.d/smb restart. Of course, you need to have the "smb" entry in this directory. In this case, in my distribution, Conectiva 8, the entry "/etc/rc.d/init.d/smb" is a link to /usr/sbin/samba. So, at the end of the day, we are talking about enter "/usr/sbin/samba restart".
Samba has two daemons: smbd and nmbd. both must be running. You can make 2 more tests to see if your samba is alive. First, enter:
Code:

ps ax|grep mbd|grep -v grep
You will see
Code:

SUSEBOX:~# ps ax|grep mbd|grep -v grep
 <PIDNO> ?        S      0:00 smbd -D
 <PIDNO> ?        S      0:00 nmbd -D

If one of this processes is not active, you need to discover what happened in the log of the process. If both are available, you have to see if you can communicate with them, entering
Code:

smbclient -L SUSEBOX -NU%
This client command will show you all the shares available on SUSEBOX
Code:

added interface ip=10.1.1.2 bcast=10.1.1.255 nmask=255.255.255.0
Domain=[PRODUCAO] OS=[Unix] Server=[Samba 2.2.7a]

        Sharename      Type      Comment
        ---------      ----      -------
        imploc        Printer  Impressora Deskjet locacao
        imp1          Printer  Oferta de impressora epson
        laser1        Printer  Oferta de impressora laser
        tmp            Disk      Temporary file space
        IPC$          IPC      IPC Service (Opiii - samba versao 2.2.7a)
        rais          Disk      Arquivos de Exportacao da GDRAIS
\        Manuais        Disk      Manuais DIS
        fgts          Disk      Arquivos do SEFIP
        ADMIN$        Disk      IPC Service (Opiii - samba versao 2.2.7a)

        Server              Comment
        ---------            -------
        OPIII                Opiii - samba versao 2.2.7a

        Workgroup            Master
        ---------            -------
        PRODUCAO            OPIII

In this example commands I assume that you machine name is SUSEBOX based on your messages but the results I show you are response of my machine which is name "opiii".

I hope it helps.


All times are GMT -5. The time now is 12:59 PM.