Novell Home

Tracking User Object Connections

Novell Cool Solutions: Tip
By Dave Parkes

Digg This - Slashdot This

Posted: 18 Jan 2006
 

Problem

A reader recently asked the following question:

"Is there an LDAP attribute that tracks the connections a user object is using? For example, I need to know how many connections a user has to our servers, and what resources those connections are connected to.

Also, can I query an LDAP attribute for a ZEN workstation object and find out which user account (if any) is connected to that workstation?"

And here's the response from Forum expert Dave Parkes ...

Solution

Here's a snippet from one of my PHP scripts. It uses the ZEN NDS info in order to give you the last logged-in user:

$basedn = "ou=Workstations,o=Norgren";
$search="(&(cn=*)(objectclass=workstation))";
$searchattr=array('dn','wmnamecomputer','zeninvcomputermodel','zeninvcomputertype','wmnameuser','wmnameos','wmnamecpu','zeninvprocessortype','zeninvmemorysize','zeninvbiostype','zeninvmacaddress','zeninvipaddress','zeninvlastscandate', 
'zeninvnovellclientversion');
//
// do the search
//
$sr=ldap_search($ds, $basedn, $search, $searchattr);
//
ldap_sort($ds, $sr, "wmnamecomputer");


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell