LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-16-2005, 10:05 AM   #1
e-stan
LQ Newbie
 
Registered: Oct 2005
Posts: 9

Rep: Reputation: 0
Question Samba Help


I've installed samba, everything works but the problem is that samba doesn't run when I start my computer. Everytime I've to type in my console smbd; nmbd; to run samba.

What can I do that samba runs on startup?


Thx
 
Old 10-16-2005, 10:08 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Welcome to LQ.

What distro are you using?
How did you install samba?
 
Old 10-16-2005, 10:10 AM   #3
e-stan
LQ Newbie
 
Registered: Oct 2005
Posts: 9

Original Poster
Rep: Reputation: 0
I'm running Slackware 10.1

I've downloaded the source of the official site and I installed it, ./configure -> make -> make install.

Isn't there a command that samba just start on startup?

Thx

Last edited by e-stan; 10-16-2005 at 10:11 AM.
 
Old 10-16-2005, 10:21 AM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If you had installed the offical slack package it would have had a startup script. The official one should work fine with a source install, although may need to update some of the paths. Just save:
Code:
#!/bin/sh
#
# /etc/rc.d/rc.samba
#
# Start/stop/restart the Samba SMB file/print server.
#
# To make Samba start automatically at boot, make this
# file executable:  chmod 755 /etc/rc.d/rc.samba
#

samba_start() {
  if [ -x /usr/sbin/smbd -a -x /usr/sbin/nmbd -a -r /etc/samba/smb.conf ]; then
    echo "Starting Samba..."
    /usr/sbin/smbd -D
    /usr/sbin/nmbd -D
  fi
}

samba_stop() {
  killall smbd nmbd
}

samba_restart() {
  samba_stop
  sleep 2
  samba_start
}

case "$1" in
'start')
  samba_start
  ;;
'stop')
  samba_stop
  ;;
'restart')
  samba_restart
  ;;
*)
  # Default is "start", for backwards compatibility with previous
  # Slackware versions.  This may change to a 'usage' error someday.
  samba_start
esac
As /etc/rc.d/rc.samba and then chmod it 755.
 
Old 10-16-2005, 10:25 AM   #5
e-stan
LQ Newbie
 
Registered: Oct 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Oké thx, let's try it
 
Old 10-17-2005, 11:18 AM   #6
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Hi...

m not sure abt slackware..

But for me in RedHat & many other distros

You can run these two commands :

Quote:
#chkconfig smb on
#chkconfig nmb on
Prior to that you also can run

Quote:
#chkconfig smb --list
#chkconfig nmb --list
to cross check that they were OFF in run-level you start you computer.



Next time you gonna restart your computer, SAMBA service & NMB service will be restarted.

Feedback for any other query.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba/Cups print sharing problems (/var/spool/samba files) Gates1026 Linux - General 9 06-23-2013 01:33 AM
I need the content from thegoldenear.org/toolbox/unices/samba/samba-setup.html rtg2001 Linux - Networking 1 08-05-2004 05:54 PM
Samba share - network name no longer available when browsing samba from win2k dorango Linux - Software 0 03-02-2004 01:02 PM
Samba: Authenticate Linux-Clients in Samba Domain & Mount mule Linux - Software 0 12-10-2003 01:21 AM
when i restart SAMBA,it says:stop samba failed,start SAMBA OK! whepin Linux - Networking 3 12-26-2001 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration