Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Other Programming Languages (http://www.programmingforums.org/forum38.html)
-   -   Net Group /ADD (on a windows box, non domain controller) (http://www.programmingforums.org/showthread.php?t=3275)

Infinite Recursion Apr 11th, 2005 8:25 AM

Net Group /ADD (on a windows box, non domain controller)
 
Alright, I have a question... finally.

I'm working on a program (in C#) that needs the ability to add groups to a stand-alone windows 2000 box... It has to be based off the NET command, or something that comes with a standard install of w2k.

When I try to issue the NET command with the following syntax it bombs out:

[GRENDEL] C:\>net group myusers /add
This command can be used only on a Windows 2000 Domain Controller.
More help is available by typing NET HELPMSG 3515.

So obviously, the problem seems to be that I can't issue "net group" commands on a machine that is not a domain controller? The "net user" commands work, just not the "net group" commands.

So my questions are:

1) Could someone enlighten me as to how I can add a group to a stand-alone
windows 2k box using "net group" or with a utility that is part of the standard install?

2) Could someone try to execute the following command on a Windows XP and or a Windows 2003 box that is not setup as a domain controller? I'm in the world of Solaris at the moment and I'm not currently able to access a windows box to test this idea.

Thanks...

Rory Apr 13th, 2005 2:27 PM

A bit late but in case you cared,
net localgroup "groupname" [users] /add

Direct API equivalent is NetLocalGroupAddW

Yeah it works, I use it all the time.


All times are GMT -5. The time now is 1:59 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC