[Samba] Looking for a script to add/remove multiple shares from smb.conf

Gerald Carter jerry at samba.org
Wed Jul 31 07:43:04 GMT 2002

On Mon, 29 Jul 2002 drew.arthur at mail.sprint.com wrote:

> Has anyone ever written a script to remove individual shares from the 
> smb.conf file? I am trying to put together a script that will add & 
> remove multiple shares at once by giving a <sharelist as input to the 
> script. 
> Adding shares is easy because I can just append the shares to the 
> smb.conf file, but removing individual share entries within the smb.conf 
> file without messing up the syntax of the file is the tricky part. Any 
> insights would be appreciated.  

See examples/misc/modify_samba_config.pl for a bare bones perl script.
May or may not be what you want.

cheers, jerry

More information about the samba mailing list