change share command

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 connects using a root account (i.e. uid == 0) or has the SeDiskOperatorPrivilege. Scripts defined in the change share command parameter are executed as root.
When executed, smbd will automatically invoke the change share command with six 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.
CSC policy - client side caching policy in string form. Valid values are: manual, documents, programs, disable.
This parameter is only used to modify existing file share definitions. To modify printer shares, use the "Printers..." folder as seen when browsing the Samba host.

Example: /usr/local/bin/changeshare

Supported on: At least Microsoft Windows 7 or Windows Server 2008 family

change share command

Registry PathSoftware\Policies\Samba\smb_conf\change share command
Value Namechange share command
Value TypeREG_SZ
Default Value


Administrative Templates (Computers)