472,986 Members | 2,902 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,986 software developers and data experts.

ADSI with PHP

Hi everyone,

I'm pretty new to using the COM functionality in PHP.
I want to administer my PC using PHP together with ADSI.
My first problem is to enumerate the groups in my domain.
I tried using the following but it didn't work:

$objDomain = new COM("WinNT://mydomain") or die("Cannot find domain");
$objDomain->filter = array("group");
foreach($objDomain as $group){
echo $group->name."<br>\n";
}
echo "Done";

all i get is the "Done" from the last line.
How can I get a list of the groups ?

Thanks in advance
Jul 17 '05 #1
2 6953
In case you have Active Directory in your domain, consider using LDAP.
You'll find the documentation and related links on www.php.net
Bjarte :-)
Kevin Otte<SP***********@gmx.de> 18.09.2003 19:45:29 >>>

Hi everyone,

I'm pretty new to using the COM functionality in PHP.
I want to administer my PC using PHP together with ADSI.
My first problem is to enumerate the groups in my domain.
I tried using the following but it didn't work:

$objDomain = new COM("WinNT://mydomain") or die("Cannot find domain");
$objDomain->filter = array("group");
foreach($objDomain as $group){
echo $group->name."<br>\n";
}
echo "Done";

all i get is the "Done" from the last line.
How can I get a list of the groups ?

Thanks in advance


Jul 17 '05 #2
bj*****@hotmail.com <bjartea@_NO_SPAN_online_DOT_no> wrote in message news:<D%*******************@news4.e.nsc.no>...
In case you have Active Directory in your domain, consider using LDAP.
You'll find the documentation and related links on www.php.net
Bjarte :-)
Kevin Otte<SP***********@gmx.de> 18.09.2003 19:45:29 >>>

Hi everyone,

I'm pretty new to using the COM functionality in PHP.
I want to administer my PC using PHP together with ADSI.
My first problem is to enumerate the groups in my domain.
I tried using the following but it didn't work:

$objDomain = new COM("WinNT://mydomain") or die("Cannot find domain");
$objDomain->filter = array("group");
foreach($objDomain as $group){
echo $group->name."<br>\n";
}
echo "Done";

all i get is the "Done" from the last line.
How can I get a list of the groups ?

Thanks in advance


Thanks for your answer !
Using ADSI should not be to difficult.
The only problem is that I don't know which expressions to use within
the foreach-statement.

Are there any concrete examples available on receiving groups or users
under Windows 2000 using LDAP with PHP ?
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Miguel Orrego | last post by:
Hi, I have found some code that authenticates users agains a domain using ADSI. I then redirect to another page and pass the username they have entered as a string. However, it would be nice to...
4
by: Akhlaq Khan | last post by:
we are developing an intranet application (web based) which needs to detect the logged in user ID of the user hitting the website. the intranet is huge and based on win2k active directory (around...
1
by: Ryan Ritten | last post by:
I was wondering if anyone knew how (or if it's even possible) to cache the results of an ADSI call in asp for a longer period of time. Basically what I am doing is I have a website that loads the...
2
by: Enigma Webmaster | last post by:
Hi All, We've written a couple of functions which, when run in VB6 work fine and allow AD users to be updated. When we include the code into an ASP Page and try and update a users information...
14
by: Arran Pearce | last post by:
Hi, I am looking for a way to use System.DirectoryServices to find all users on a domain whos accounts are either locked out or disabled. I have used ADSIEdit and the mmc schema add-in to try...
3
by: Roy Osherove | last post by:
Hi folks. I have an ASP.Net application that runs a .Net dll that uses WMI and ADSI(both managed) to connect to a given IIS root and search through it. When not using the ASP.Net client, but...
8
by: msnews.microsoft.com | last post by:
I have ADSI code that I can make work at the command line. I cannot in any way get it to work in asp.net. Even using Windows authentication, impersonation on, and providing the credentials...
3
by: chat_devil | last post by:
hi, does anyone know if it is possible to remove an attribute that can not be read into the ADSI property cache/collection. i'm trying to do an eDirectory password change from .net directory...
1
by: LittlePython | last post by:
I am a little confused on why I can not detect an object that does not exist with a try and except. If I understand ADSI correctly from what I have read you do not create these objects but rather...
8
by: John | last post by:
Hi, gurus, How can I implement the following feature in C#: Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup & ", group") For Each objMember In objGroup.Members...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.