add share command

Samba 2.2.0 introduced the ability to dynamically add and delete shares via the Windows NT 4.0 Server Manager. The add share command is used to define an external program or script which will add a new service definition to smb.conf.
In order to successfully execute the add share command, smbd requires that the administrator connects using a root account (i.e. uid == 0) or has the SeDiskOperatorPrivilege. Scripts defined in the add share command parameter are executed as root.
When executed, smbd will automatically invoke the add 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 to add file shares. To add printer shares, see the .

Example: /usr/local/bin/addshare

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

add share command

Registry HiveHKEY_LOCAL_MACHINE
Registry PathSoftware\Policies\Samba\smb_conf\add share command
Value Nameadd share command
Value TypeREG_SZ
Default Value

samba.admx

Administrative Templates (Computers)