EDN Admin
Well-known member
Im using the System.Management namespace to try to use WMI peformance counters and I have an authentication issue that I cannot work out.
I have 2 domains - lets call them RED and BLUE. Im told that a trust is set up such that BLUE trusts everything from RED. Im trying to connect from computer R in RED domain to computer B in BLUE domain.
Firstly, I can connect ok using Bs local admin account:
ConnectionOptions opts = new ConnectionOptions();
opts.Username = "B\Administrator";
opts.Password = "adminpassword";
ManagementScope scope = new ManagementScope("\\B.BLUE\root\cimv2", opts);
scope.Connect();
and this works fine - I then go on to reading performance counters - so there appears to be no blocking firewall or anything wrong here.
I then added my account REDMusMuris to Bs local administrator group. I can now log-on to windows directly on B as myself, however when I try using REDMusMuris with my password via WMI I get an access denied.
However what I really dont get is that if I run the same program on a 2nd computer in the BLUE domain (call it B2) then it connects fine and runs using the REDMusMuris account - so again it appears there is nothing on B stopping me from doing this and REDMusMuris must have permissions to do this.
To add more confusion it appears that sometimes I <span style="font-weight:bold can connect providing Im logged into REDR as myself and <span style="font-weight:bold do not suppy my password. Then its ok - adding the password back in fails again.
In all cases the fail is with an "Access Denied" error. Any ideas on where I could get help with this?
View the full article
I have 2 domains - lets call them RED and BLUE. Im told that a trust is set up such that BLUE trusts everything from RED. Im trying to connect from computer R in RED domain to computer B in BLUE domain.
Firstly, I can connect ok using Bs local admin account:
ConnectionOptions opts = new ConnectionOptions();
opts.Username = "B\Administrator";
opts.Password = "adminpassword";
ManagementScope scope = new ManagementScope("\\B.BLUE\root\cimv2", opts);
scope.Connect();
and this works fine - I then go on to reading performance counters - so there appears to be no blocking firewall or anything wrong here.
I then added my account REDMusMuris to Bs local administrator group. I can now log-on to windows directly on B as myself, however when I try using REDMusMuris with my password via WMI I get an access denied.
However what I really dont get is that if I run the same program on a 2nd computer in the BLUE domain (call it B2) then it connects fine and runs using the REDMusMuris account - so again it appears there is nothing on B stopping me from doing this and REDMusMuris must have permissions to do this.
To add more confusion it appears that sometimes I <span style="font-weight:bold can connect providing Im logged into REDR as myself and <span style="font-weight:bold do not suppy my password. Then its ok - adding the password back in fails again.
In all cases the fail is with an "Access Denied" error. Any ideas on where I could get help with this?
View the full article