LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-27-2010, 12:25 PM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,561

Rep: Reputation: 37
Does a new samba share require a samba restart


Do you have to restart Samba when you add a new share to the smb.conf file, or does it check every so often for new mounts and make them available?
 
Old 01-27-2010, 02:32 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,077

Rep: Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713
Quote:
Originally Posted by rjo98 View Post
Do you have to restart Samba when you add a new share to the smb.conf file, or does it check every so often for new mounts and make them available?
You have to do an "/etc/init.d/smb reload", to (obviously), reload the config, to pick up or remove shares. It doesn't automatically do it.
 
Old 01-27-2010, 03:45 PM   #3
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,561

Original Poster
Rep: Reputation: 37
ok, thanks. wish there was a way to get it to pick up the new one without stopping and starting the whole thing since i have other people connected to other shares.
 
Old 01-27-2010, 04:53 PM   #4
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,077

Rep: Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713
Quote:
Originally Posted by rjo98 View Post
ok, thanks. wish there was a way to get it to pick up the new one without stopping and starting the whole thing since i have other people connected to other shares.
I don't think it'll drop the connected users off by doing a reload. A restart would, but I don't think the reload will effect anything.

You could just try it, and listen for the wails of your users, though.
 
Old 01-27-2010, 04:54 PM   #5
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,561

Original Poster
Rep: Reputation: 37
haha, i thought a reload and restart did the same thing, not that i really have anything to base it on. I can give it a shot.
 
Old 01-27-2010, 04:56 PM   #6
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,561

Original Poster
Rep: Reputation: 37
actually, according to this website it kicks the users off

http://wiki.contribs.org/User_homes_admin_access
 
Old 01-27-2010, 07:00 PM   #7
pentode
Member
 
Registered: Dec 2005
Location: Oregon
Distribution: Debian Testing
Posts: 488

Rep: Reputation: 38
I've done samba restarts that generally go unnoticed by my users. YMMV, of course.
 
Old 01-28-2010, 02:08 PM   #8
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,077

Rep: Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713
Quote:
Originally Posted by rjo98 View Post
actually, according to this website it kicks the users off

http://wiki.contribs.org/User_homes_admin_access
According to that, it's the restart that kicks them off. A reload (or force-reload), just re-reads the config.
 
Old 01-28-2010, 02:38 PM   #9
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,561

Original Poster
Rep: Reputation: 37
OK, I must have read it wrong, I thought the sentences above the commands went with the commands below them in that example they showed.


Save & exit the file

Ctrl o
Ctrl x

then expand the template

expand-template /etc/smb.conf

then restart the samba server so your template is active. Note that this will momentarily stop samba, so ensure that all users have disconnected from & stopped using all shares first

/etc/init.d/smb reload

then restart smb

/etc/init.d/smb restart
 
Old 01-28-2010, 04:45 PM   #10
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,077

Rep: Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713Reputation: 2713
Quote:
Originally Posted by rjo98 View Post
OK, I must have read it wrong, I thought the sentences above the commands went with the commands below them in that example they showed.
Those were examples, and the CTRL O/X are editor commands. If you've already edited your smb.conf file, you're ready
Quote:
/etc/init.d/smb reload

/etc/init.d/smb restart
Those are the commands that reload and restart Samba. You need to be root to run them.
 
  


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
How to edit files with xemacs over Samba share? Samba problem? rylan76 Linux - Software 1 11-13-2008 02:00 AM
Trouble mounting Samba share from Windows Mobile 6.1 - samba weirdness cleidh_mor Linux - Server 0 09-21-2008 03:43 PM
Samba - dont have permission to browse samba share. Scrag Linux - Software 4 11-28-2006 02:42 AM
Samba share - network name no longer available when browsing samba from win2k dorango Linux - Software 0 03-02-2004 02:02 PM
when i restart SAMBA,it says:stop samba failed,start SAMBA OK! whepin Linux - Networking 3 12-26-2001 06:54 AM


All times are GMT -5. The time now is 01:41 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration