Hi there, I just saw samba added the "net rpc service" for Win32 service management since 3.0.20, and it's fantastic. I used to use samba-tng to do this job, but now I can use samba! However, I also found it has limited usage. I cannot pass parameters when I start a service, and I cannot create a new service, too. Is there any plan for samba to extend this feature? -- Best Regards, Shih-Yun Shen (sysheen@gmail.com)
On Tue, Mar 13, 2007 at 03:27:01PM +0800, syshen wrote:> I just saw samba added the "net rpc service" for Win32 service > management since 3.0.20, and it's fantastic. I used to use samba-tng > to do this job, but now I can use samba! However, I also found it has > limited usage. I cannot pass parameters when I start a service, and I > cannot create a new service, too. > > Is there any plan for samba to extend this feature?I'm not aware that this is on anyone's active list, but it should be quite trivial to do if this is doable via RPC at all. I'll be happy to review/test a patch. Volker -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20070313/dfc40e03/attachment.bin
On 3/13/2007 3:27 AM, syshen wrote:> I just saw samba added the "net rpc service" for Win32 service > management since 3.0.20, and it's fantastic. I used to use samba-tng to > do this job, but now I can use samba! However, I also found it has > limited usage. I cannot pass parameters when I start a service, and I > cannot create a new service, too.You can manipulate the services that are advertised by editing smb.conf see http://www.ehsco.com/reading/20061017iwc1.html -- Eric A. Hall http://www.ehsco.com/ Internet Core Protocols http://www.oreilly.com/catalog/coreprot/
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 dtylman@gmail.com wrote:> I am interested in implementing the 'createservice()' functionality > using the RPC protocol. I need this functionality badly, and I > understand it is not implemented.> I understand vaguely how this should be working and found > some documentation, > here: http://www.hsc.fr/ressources/articles/win_net_srv/ > here:http://www.hsc.fr/ressources/articles/win_net_srv/ > well_known_named_pipes.html > and here: http://www.hsc.fr/ressources/articles/win_net_srv/msrpc_srvsvc.html.Also look at the svcctl.ild definition in SAMBA_4_0. http://websvn.samba.org/cgi-bin/viewcvs.cgi/branches/SAMBA_4_0/source/librpc/idl/svcctl.idl?rev=18639&view=markup> I guess the issue here is to use the same method used > in the 'net' command ('net.c' - util) and try to call > the rpc-client with just different parameter as > the above mentioned links state. > > I don't have much experience in samba programming and I > need to know: > (a) how complicate is that? should it be an easy task? > (b) I need some starting point. > > (of course - if this is already implemented somewhere, i would > be glad to know!)It's not too hard. Look at svn://svnanon.samba.org/samba/SAMBA_3_0/source/utils/net_rpc_service.c You'll need to do a few things. * Add request/reply structures to include/rpc_svcctl.h * Add the parsing functions to rpc_parse/parse_svcctl * Add the client function to rpc_client/cli_svcctl.c * Add in the new command to net_rpc_service.c Start by looking at how the existing service management calls are implemented and then start adapting that to the new call. All make sure you have a current release of wireshark to anaylze the traffic and make sure that parsing functions are doing the right thing. Might even be good idea to get comfortable with the trafiic between two windows servers while playing with the Service Control MMC plugin. Hope this helps get you started. cheers, jerry ====================================================================Samba ------- http://www.samba.org Centeris ----------- http://www.centeris.com "What man is a man who does not make the world better?" --Balian -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGFW2FIR7qMdg1EfYRAo5zAJ0YPqvjTdWsCPiUvCCoYmbFaC0BjgCgg2+n pdRXnahzWjL6NzMUcr/sjyU=ShmY -----END PGP SIGNATURE-----