Samba 2.2.0 introduced the ability to dynamically
add and delete shares via the Windows NT 4.0 Server Manager. The
change share command is used to define an
external program or script which will modify an existing service definition
in smb.conf. In order to successfully
execute the change share command, smbd
requires that the administrator be connected using a root account (i.e.
uid == 0).
When executed, smbd will automatically invoke the
change share command with five parameters.
configFile - the location
of the global smb.conf file.
shareName - the name of the new
share.
pathName - path to an **existing**
directory on disk.
comment - comment string to associate
with the new share.
max
connections
Number of maximum simultaneous connections to this
share.
This parameter is only used modify existing file shares definitions. To modify
printer shares, use the "Printers..." folder as seen when browsing the Samba host.
add share command
delete share command
/usr/local/bin/addshare