Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enumerate what group the local user is a member of

Status
Not open for further replies.

slundy

MIS
Jul 26, 2005
3
US
I've seen tons of these for domains, but where I work we're on novell, so no domain to bind to, or query. Basically just need to find out if the logged on user is a part of the power users group, or administrators group. Those are the only two groups that are in use from an enterprise perspective. I've tried hacking up a domain script but since I'm a total n00b at this I just get frustrated and give up.

any help or guidance would be greatly appreicated.
 
Also, we're porting this to a comma delimited text file, but I noticed in a few others scripts that people we're porting theirs to excel spreadsheets. That's where ours will end up, so any help on that end would be helpful as well.
 
Here just a few things i found. Not sure if it helps but good luck.


eDirectory 8.8 Documentation



art of eDirectory Novell provides an LDAP attribute mapping
engine, you can find out more in the docs here
 
Ended up using this:

Set objNetwork = CreateObject("Wscript.Network")
strComputer = objNetwork.ComputerName
Set wshShell = CreateObject("WScript.Shell")
strUser = wshShell.ExpandEnvironmentStrings("%USERNAME%")
Set colGroups = GetObject("WinNT://" & strComputer & "")
colGroups.Filter = Array("Group")

For Each objGroup In colGroups
For Each objUser in objGroup.Members
If objUser.name = strUser Then
Echo objGroup.Name
End If
Next
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top