Re: How to add/remove local users on a remote machine
From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 05/15/04
- Previous message: Björn Holmgren: "Re: How to add/remove local users on a remote machine"
- In reply to: Björn Holmgren: "Re: How to add/remove local users on a remote machine"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 15 May 2004 16:45:14 -0500
Remember that he's cross-posted to m.p.active.directory.interfaces and
m.p.adsi.general as well. These newsgroups tend to be pretty agnostic to
API (COM/ADSI, .NET, LDAP, LDIF, etc. are all welcome) and are the
appropriate newsgroups to ask S.DS questions.
That said, his problem is related to delegating security context which might
be hard to get to work with ADSI/S.DS. But maybe if you know a WMI way to
do this that doesn't require a domain or forest trust to the remote machine,
that might be the answer. This would not be too hard for him to translate
into .NET using the System.Management namespace.
Any ideas?
Joe K.
"Björn Holmgren" <bjohol@hotmail.com> wrote in message
news:eH382XlOEHA.640@TK2MSFTNGP12.phx.gbl...
> System.DirectoryServices.DirectoryEntry? Isn't that from the .NET
framework?
>
> While I could easily provide some code that uses API calls (or ADSI, or
WMI)
> to create a local user on any remote machine, I feel doing so would be
> meaningless if you're using VB.NET.
>
> Most people here are using "classic" VB versions (6 and below), and in
fact,
> the microsoft.public.vb.* newsgroups are for classic VB only. VB.NET
> questions should be asked in a group with the word "dotnet" in its name.
>
> You may start by posting your question to
> news:microsoft.public.dotnet.languages.vb
>
>
>
> --
> Björn Holmgren
> Guide Konsult AB
> "Lasse F. Pedersen" <lassefpedersen@REMaas.FOOnja.BARdk> skrev i
meddelandet
> news:uzOX%233NOEHA.3964@TK2MSFTNGP10.phx.gbl...
> > Hello,
> >
> > I have a class with a couple of functions, one for adding a local user
on
> a
> > remote machine, and one for removing a local user on a remote machine. I
> > need to be able to do this. Each takes the name of the remote machine, a
> > username (remote machine administrator), a matching password, and some
> > details about the user to add/remove as arguments.
> >
> > In each function I'm using System.DirectoryServices.DirectoryEntry to
> > connect to the given machine with the username and password specified,
and
> > supposing that these are in effect, I go from there...
> >
> > However! When I reach the point where I have to, in the add user
> function -
> > for example, commit my changes to the new user entry (which was obtained
> > from machineEntry.Children.Add(new_of_new_user)), I'm getting a "General
> > access denied error."
> >
> > My question is:
> > How do I create a local user on a remote machine which is not a member
of
> my
> > domain?
> >
> > I've tried using LogonUser and impersonation, but since most of the
remote
> > machines I need to access are not a member of the same domain as mine,
> that
> > does not seem to be working for me either.
> >
> > Thanks,
> > Lasse
> >
> >
>
>
- Previous message: Björn Holmgren: "Re: How to add/remove local users on a remote machine"
- In reply to: Björn Holmgren: "Re: How to add/remove local users on a remote machine"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|