LinuxQuestions.org
Register a domain and help support LQ
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 11-21-2003, 01:26 PM   #1
Charlie Spencer
Member
 
Registered: Nov 2003
Location: South Carolina, USA
Distribution: Fedora Core 5
Posts: 106

Rep: Reputation: 15
Samba - Start or Restart?


I'm reading about Samba and I find references to starting, stopping, and restarting smbd and nmbd. I've seen ways to do this via commands, scripts, and GUI's. In all cases, restarting after stopping is done differently from initially starting. Having different ways to start and restart something implies there is a difference between the two.

What's the difference between starting and restarting these services? (Is the Windows term "service" correct? I'm still developing a volcabulary.) Is there a time when one is more appropriate than the other, such as after a reboot or log out? Do these differences apply to other things in Linux?

If I stop my weed whacker, I don't have to set the choke before I restart it.
 
Old 11-21-2003, 02:13 PM   #2
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
It depends. Are you running Samba from xinetd/inetd or as standalone from a Sys V startup script?

From standalone:
/etc/rc.d/init.d/smb {start|stop|restart|status}

If you restart it essentially reparses the configuration file, so any new changes will be accepted.
Starting with this method will be no different than init.

http://www.oreilly.com/catalog/samba...k/ch02_05.html
 
Old 11-21-2003, 02:34 PM   #3
Charlie Spencer
Member
 
Registered: Nov 2003
Location: South Carolina, USA
Distribution: Fedora Core 5
Posts: 106

Original Poster
Rep: Reputation: 15
And here I was, foolishly hoping it was something simple.

I'm sorry, I haven't learned enough yet to know what you mean by xinetd/inetd or Sys V. I understand reparse and init in other contexts, but I'm reluctant to assume they mean the same thing here. Is 'init' synonomous with 'boot'? I'll researchthese terms and post a hopefully intelligent answer, but it's going to take me a while.

The command you show looks familiar from reading at http://www.linuxheadquarters.com/how...g/samba.shtml, but they have 'samba' where you have 'smb'. I couldn't find 'samba' in that directory; I can find smb so I'll try that.

But I still don't know when I should specify 'start' vs 'restart'. Is it 'start' if the service doesn't start automatically at boot, and 'restart' only after a 'stop'? Or is it 'restart' only if I change a configuration file while stopped? What happens if I change a config and 'start' instead of 'restart'?

I'll just go over here and wet the newspaper with the other puppies.
 
Old 11-21-2003, 03:44 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
How did you install it? If you used the redhat rpm then as root try:
service smb restart
 
Old 11-21-2003, 04:03 PM   #5
nairnie
LQ Newbie
 
Registered: Oct 2003
Location: UK
Distribution: RedHat 9, Slackware 9.1, Debian
Posts: 28

Rep: Reputation: 15
I have only just started using samba today ,so am by no means an expert. I have used the line "service smb start" to start the service originally. When working in SWAT or in the smb.conf file after a change you need to restart (stop and start) the service again so that it updates and the canges can take affect.

Thus the command "service smb restart" stops the service then starts it again so that you don't have to type the two commands "service smb stop" followed by "service smb start".

That is my take on it anyway. Hope that helps.
 
Old 11-22-2003, 10:39 AM   #6
Charlie Spencer
Member
 
Registered: Nov 2003
Location: South Carolina, USA
Distribution: Fedora Core 5
Posts: 106

Original Poster
Rep: Reputation: 15
Nairnie, thanks. JCookman and David Ross, thanks for providing assistance, but I'm not having any trouble starting Samba. I'm just trying to find out the difference between starting and restarting. As I understand Nairnie, 'restart' is a single command that saves entering separate 'stop' and 'start' commands. Thanks.
 
  


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
nfs won't restart (or start for that matter!) strong.steve Red Hat 3 04-16-2005 02:10 AM
ifconfig on Network start/restart chris1303 Linux - Networking 7 02-04-2005 03:21 AM
how can i start, stop or restart Paxmaster Slackware 3 11-27-2004 01:31 PM
Synaptic will not start after restart! Oh Cisco Debian 8 07-29-2004 11:44 AM
when i restart SAMBA,it says:stop samba failed,start SAMBA OK! whepin Linux - Networking 3 12-26-2001 05:54 AM


All times are GMT -5. The time now is 09:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration