Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Setting users and passwords in NT


Message #1 by "norman" <norman@c...> on Wed, 25 Apr 2001 20:55:09
Solution Found.

For those who are interesting in doing this, please go to the following 
web page.
1) 
http://support.microsoft.com/support/kb/articles/Q159/4/98.asp?LN=3DEN-US
&SD=3Dgn&FR=3D0&qry=3Dnetuseradd&rnk=3D1&src=3DDHCS_MSPSS_gn_SRCH&SPR=3DV
BB

2) http://www.vbsquare.com/articles/ntvb/index2.html

n.b. Karl Greenwood thank you  for your help.

Norman


----- Original Message -----
From: "Karl Greenwood" <KarlG@R...>
To: "professional vb" <pro_vb@p...>
Sent: Thursday, April 26, 2001 7:39 AM
Subject: [pro_vb] RE: Setting users and passwords in NT


>
> > Can anyone tell me how to code in vb to add new users and
> > passwords in
> > Window NT?
>
> With api calls have a look at (sorry haven't got the vb versions)
>
> NET_API_STATUS NetLocalGroupAdd(
>   LPCWSTR servername,
>   DWORD level,       
>   LPBYTE buf,        
>   LPDWORD parm_err   
> );
>
> NET_API_STATUS NetLocalGroupAddMembers(
>   LPCWSTR servername,    
>   LPCWSTR groupname,     
>   DWORD level,           
>   LPBYTE buf,            
>   DWORD totalentries     
> );
>
> You can also shell out:
>
> open a command prompt window and type NET HELP USER
> this will give you the syntax to mess with user accounts
> For example:
>
> Shell "Net User Fred Password /Add"
>
> This would add a user called Fred with a password of Password to the 
local
> machine
>
>
>


  Return to Index