On-the-fly share modification

On-the-fly share modification

Post by Michel Alexandre Sali » Tue, 08 Feb 2000 04:00:00



Hi,
    I apologize if this has been raised before but I have just noticed
how cumbersome Samba's share configuration process is. Though GUI
interfaces exist, share addition/modification/deletion still involves
editing a single .conf file. This has the implication that the whole
configuration file has to be re-read which currently apparently requires
restarting smbd (correct me if I'm wrong on this - does it actually
update itself every minute like is the case with fstab?)
    As this requires killing all open connections it doesn't seem to be
a wise idea when it comes to servers which have to be available all the
time. Any pointers welcome.

Regards,
Michel Salim

 
 
 

On-the-fly share modification

Post by David M. Plumme » Tue, 08 Feb 2000 04:00:00


It's not necessary to restart the server. I make changes frequently
and they show up quickly on the clients.

Hope this helps,
Dave Plummer



Quote:> Hi,
>     I apologize if this has been raised before but I have just
noticed
> how cumbersome Samba's share configuration process is. Though GUI
> interfaces exist, share addition/modification/deletion still
involves
> editing a single .conf file. This has the implication that the whole
> configuration file has to be re-read which currently apparently
requires
> restarting smbd (correct me if I'm wrong on this - does it actually
> update itself every minute like is the case with fstab?)
>     As this requires killing all open connections it doesn't seem to
be
> a wise idea when it comes to servers which have to be available all
the
> time. Any pointers welcome.

> Regards,
> Michel Salim


 
 
 

On-the-fly share modification

Post by Michel Alexandre Sali » Tue, 08 Feb 2000 04:00:00



> It's not necessary to restart the server. I make changes frequently
> and they show up quickly on the clients.

> Hope this helps,
> Dave Plummer

Thanks... just wondering, though, whether there is a command to 'refresh'
the samba configuration immediately? Imagine if SMB is fully integrated
into, say, Konqueror or Nautilus or E-FM, and the confusion it will
create for an end-user if there is a lag of a few minutes until Samba
catches up with its configuration file.

Michel Salim

 
 
 

On-the-fly share modification

Post by ra.. » Tue, 08 Feb 2000 04:00:00



Quote:>Hi,
>    I apologize if this has been raised before but I have just noticed
>how cumbersome Samba's share configuration process is. Though GUI
>interfaces exist, share addition/modification/deletion still involves
>editing a single .conf file. This has the implication that the whole
>configuration file has to be re-read which currently apparently requires
>restarting smbd (correct me if I'm wrong on this - does it actually
>update itself every minute like is the case with fstab?)

What in the?

Fstab is *NOT* re-updated. It's read at run time of things like "mount".
smb.conf is read when a new smbd or nmbd is started, or the current
ones recieve a "SIGHUP". This is why the smb startup script for Linux
has a "restart" option that gracefully does the right things.

Quote:>    As this requires killing all open connections it doesn't seem to be
>a wise idea when it comes to servers which have to be available all the
>time. Any pointers welcome.

It's not necessary. The "restart" option does not kill current connections.

--

                        Nico Kadel-Garcia

 
 
 

On-the-fly share modification

Post by Daniel Petze » Tue, 08 Feb 2000 04:00:00



> Hi,
>     I apologize if this has been raised before but I have just noticed
> how cumbersome Samba's share configuration process is. Though GUI
> interfaces exist, share addition/modification/deletion still involves
> editing a single .conf file. This has the implication that the whole
> configuration file has to be re-read which currently apparently requires
> restarting smbd (correct me if I'm wrong on this - does it actually
> update itself every minute like is the case with fstab?)
>     As this requires killing all open connections it doesn't seem to be
> a wise idea when it comes to servers which have to be available all the
> time. Any pointers welcome.

  1. All new SMB-connection re-reads the smb.conf file.
  2. All current SMB-connections rescans and re-reads the smb.conf
     file if it has been modified. Frequency unknown, but a quick
     look in the source code would suffice.
  3. Samba listens to signal HUP. Send a "kill -HUP <PID>" to force an
     instant re-read of the config file. A recursive re-read could be
     triggered if the signal is sent to the main smbd process (contained
     in var/locks/nmbd.pid).
  4. Some parameters (usually in the [GLOBAL]-section) requires a restart.
     I have no list over which they are.

  /// Daniel Petzn

Quote:

> Regards,
> Michel Salim

 
 
 

On-the-fly share modification

Post by Michel Alexandre Sali » Tue, 08 Feb 2000 04:00:00


Uh, seems like it's another case of RTFM. Thank you for your patience
everyone.

Michel Salim

 
 
 

On-the-fly share modification

Post by kak.. » Tue, 08 Feb 2000 04:00:00


If you are using swat, all you have to do is connect to the server with
your favorite web browser on port 901, click the shares button and enter
the information for your new share.  when you click commit changes, swat
sends smbd a hangup signal, and everyone is happy.


> Hi,
>     I apologize if this has been raised before but I have just noticed
> how cumbersome Samba's share configuration process is. Though GUI
> interfaces exist, share addition/modification/deletion still involves
> editing a single .conf file. This has the implication that the whole
> configuration file has to be re-read which currently apparently requires
> restarting smbd (correct me if I'm wrong on this - does it actually
> update itself every minute like is the case with fstab?)
>     As this requires killing all open connections it doesn't seem to be
> a wise idea when it comes to servers which have to be available all the
> time. Any pointers welcome.

> Regards,
> Michel Salim

--

In /dev/null, no one can hear you stream...

 
 
 

On-the-fly share modification

Post by kak.. » Tue, 08 Feb 2000 04:00:00


I suppose you could also just do a 'killall -1 smbd'


> If you are using swat, all you have to do is connect to the server with
> your favorite web browser on port 901, click the shares button and enter
> the information for your new share.  when you click commit changes, swat
> sends smbd a hangup signal, and everyone is happy.


> > Hi,
> >     I apologize if this has been raised before but I have just noticed
> > how cumbersome Samba's share configuration process is. Though GUI
> > interfaces exist, share addition/modification/deletion still involves
> > editing a single .conf file. This has the implication that the whole
> > configuration file has to be re-read which currently apparently requires
> > restarting smbd (correct me if I'm wrong on this - does it actually
> > update itself every minute like is the case with fstab?)
> >     As this requires killing all open connections it doesn't seem to be
> > a wise idea when it comes to servers which have to be available all the
> > time. Any pointers welcome.

> > Regards,
> > Michel Salim

> --

> In /dev/null, no one can hear you stream...

--

In /dev/null, no one can hear you stream...