I have administrator access on 2 different domains on the network at my job.
I wrote a program to query the registry key on remote PC's and return the
results to an excel spreadsheet. However, the program only works for the
domain I am currently logged into. If I try to query a machine on another
domain I get "permission denied". So I have to log out and log back in to
the other domain.
I recently used a program that added users to a group on remote pc's. This
program allowed you to enter your userid & password for each domain, then it
went out to all the pc's in the list and added the users it needed.
I have 2 questions now:
1. How do I send userid, password, domain name to a remote pc for access?
2. Add, change, delete users remotely?
Thanks! 3 3107
You'll have to impersonate the other login. Query the .NET docs in MSDN for
Impersonation and WindowsPrincipa l, and you should see some samples.
Be careful of the options you pass to LogonUser (read the API docs for
LogonUser carefully), because some options create a fast login token, but
bypass some of the steps required to access network resouces.
-Rob Teixeira [MVP]
"Terry Olsen" <to******@hotma il.com> wrote in message
news:O1******** ******@tk2msftn gp13.phx.gbl... I have administrator access on 2 different domains on the network at my
job. I wrote a program to query the registry key on remote PC's and return the results to an excel spreadsheet. However, the program only works for the domain I am currently logged into. If I try to query a machine on another domain I get "permission denied". So I have to log out and log back in to the other domain.
I recently used a program that added users to a group on remote pc's.
This program allowed you to enter your userid & password for each domain, then
it went out to all the pc's in the list and added the users it needed.
I have 2 questions now:
1. How do I send userid, password, domain name to a remote pc for access? 2. Add, change, delete users remotely?
Thanks!
You'll have to impersonate the other login. Query the .NET docs in MSDN for
Impersonation and WindowsPrincipa l, and you should see some samples.
Be careful of the options you pass to LogonUser (read the API docs for
LogonUser carefully), because some options create a fast login token, but
bypass some of the steps required to access network resouces.
-Rob Teixeira [MVP]
"Terry Olsen" <to******@hotma il.com> wrote in message
news:O1******** ******@tk2msftn gp13.phx.gbl... I have administrator access on 2 different domains on the network at my
job. I wrote a program to query the registry key on remote PC's and return the results to an excel spreadsheet. However, the program only works for the domain I am currently logged into. If I try to query a machine on another domain I get "permission denied". So I have to log out and log back in to the other domain.
I recently used a program that added users to a group on remote pc's.
This program allowed you to enter your userid & password for each domain, then
it went out to all the pc's in the list and added the users it needed.
I have 2 questions now:
1. How do I send userid, password, domain name to a remote pc for access? 2. Add, change, delete users remotely?
Thanks!
I've used the example found in MSDN for impersonation. But as the article
says, it doesn't work in W2K because of the default security settings. I
get "Client does not posess the required permissions." Is there a way to
override this in the code without changing the security policy? This other
program I have seems to do it, as it "impersonat es" users from 2 domains on
a pc logged in with a "standard user" id.
"Rob Teixeira [MVP]" <RobTeixeira@@m sn.com> wrote in message
news:eo******** ******@TK2MSFTN GP10.phx.gbl... You'll have to impersonate the other login. Query the .NET docs in MSDN
for Impersonation and WindowsPrincipa l, and you should see some samples. Be careful of the options you pass to LogonUser (read the API docs for LogonUser carefully), because some options create a fast login token, but bypass some of the steps required to access network resouces.
-Rob Teixeira [MVP]
"Terry Olsen" <to******@hotma il.com> wrote in message news:O1******** ******@tk2msftn gp13.phx.gbl... I have administrator access on 2 different domains on the network at my job. I wrote a program to query the registry key on remote PC's and return
the results to an excel spreadsheet. However, the program only works for
the domain I am currently logged into. If I try to query a machine on
another domain I get "permission denied". So I have to log out and log back in
to the other domain.
I recently used a program that added users to a group on remote pc's. This program allowed you to enter your userid & password for each domain,
then it went out to all the pc's in the list and added the users it needed.
I have 2 questions now:
1. How do I send userid, password, domain name to a remote pc for
access? 2. Add, change, delete users remotely?
Thanks!
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Matt |
last post by:
Hiya
I have to develop a web application for my company in
which I need to have a facility for username and password
for the employees to do certain tasks. How can this be
implemented in ASP. I am thinking of having usernames and
passwards (encrypted) in database and when a person tries
to log in, the script will compare those stored in databse
to the values entered by user. But after the user has
logged in, how can I make sure that the...
|
by: thoducng |
last post by:
I am writing some code to access share folder on a remote network.
DirectoryInfo dicInfo = new DirectoryInfo("remoteNetwork\shareFolder");
if (dicInfo.Exists)
{
//application code followed
|
by: Terry Olsen |
last post by:
I have administrator access on 2 different domains on the network at my job.
I wrote a program to query the registry key on remote PC's and return the
results to an excel spreadsheet. However, the program only works for the
domain I am currently logged into. If I try to query a machine on another
domain I get "permission denied". So I have to log out and log back in to
the other domain.
I recently used a program that added users to a...
|
by: Eric Sheu |
last post by:
Greetings,
I have been searching the web like mad for a solution to my SMTP problem. I
am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a
web site I have created to the members of my organization. I think my problem
is incorrectly setting the settings on my server or an authentication
problem. Here is the code I have written to send a test message:
-----Code Begins: Sensitive Information Replaced by -----...
|
by: Kirk |
last post by:
The following C# web service works fine until you uncomment the lines
setting UserName and Password. Then, Process.Start throws an
Access is Denied Exception. This is with .NET 2.0, of
course (1.1 does not support running a process as a different user).
I'm running everything on Windows Server 2003. I have impersonation
enabled
in my web.config, and I'm using Integrated authentication on the IIS
virtual
directory that this aspx is in....
| |
by: kamal |
last post by:
hi ,
When i tried to send mails by using smtp authentication it was giving an
exception
"Could not access 'CDO.Message' object.". can any body help me.
string smtpServer = "smtp.domain.com";
string userName = "userid";
string password = "password";
int cdoBasic = 1;
int cdoSendUsingPort = 2;
MailMessage msg = new MailMessage();
|
by: Kevin O'Brien |
last post by:
Hello,
I am creating a sign on screen for my application in which I want to store
the username and password in a database table. I was thinking of putting a
combo box connected to the database to pull up the usernames and then having
a textbox for the user to enter their password.
Can someone tell me please how to compare the contents of the textbox to the
password in the database?
|
by: ranishobha21 |
last post by:
Dear All,
I am sending the code below.i have not specifies the host name.i want
to send command to server and get the response from it.but it doesnt
work.when i connect with the telnet using ssh to remote machine it
works.
i type telnet hostname->username->password and then i can login to
the
|
by: Danny |
last post by:
Hi all,
Trying to send mail with System.Net.SmtpClient, using very simple code
just for testing:
SmtpClient smtp = new SmtpClient("mail.server.com", 25);
smtp.Credentials = new
System.Net.NetworkCredential("user", "password");
try
{
|
by: Jack |
last post by:
Hi,
I am still new to .NET so, i'm sorry if my question is a bit too simple :-)
I would like to know what is the "best-practice-way" of sending email from
asp.net (VbScript). I want to make a "contact us" page for my website.
Tnx.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |