[Samba] net share command

Tomas mrjoe at centrum.sk
Thu Jul 7 23:02:32 GMT 2005


>Hi team,
>
>I need to execute some net share command on a Samba 3.0.4/LDAP server.
>I guess this command needs to be run as root, so I use Administrator account
>(uid=0,primarygroupsid=512) but I have the following behaviour :
># net share add test=/var/tmp -U administrator%password
>- with loglevel 0 : no warning, but no new share
>- with loglevel 3 :
>[Mon Dec  6 15:39:12 2004
>, 1] utils/net_rpc.c:run_rpc_command(141)
>  rpc command function failed! (NT_STATUS_UNSUCCESSFUL)
>
>- with loglevel 10 :
>[Mon Dec  6 15:39:12 2004
>, 5] rpc_parse/parse_prs.c:prs_werror(694)
>      001c status: WERR_ACCESS_DENIED
>[Mon Dec  6 15:39:12 2004
>and server side
>[Mon Dec  6 15:39:38 2004
>, 5] rpc_parse/parse_prs.c:prs_werror(694)
>      0004 status: WERR_ACCESS_DENIED
>[Mon Dec  6 15:39:38 2004
>, 5] rpc_server/srv_pipe.c:api_rpcTNP(1575)
>  api_rpcTNP: called srvsvc successfully
>[Mon Dec  6 15:39:38 2004
>
>Did I miss something ?
>
>Many thanks


Hi Lapin(c)

Try look at "man smb.conf" section "add share command".
Or 
http://us3.samba.org/samba/docs/man/Samba-HOWTO-Collection/NetCommand.html#id2565131 
-------snip---------
 It must be noted that the addition and deletion of shares using this tool 
depends on the availability of a suitable interface script. The interface 
scripts Sambas smbd uses are called: add share script and delete share 
script. A set of example scripts are provided in the Samba source code 
tarball in the directory ~samba/examples/scripts.
--------snip---------


More information about the samba mailing list