WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Groups

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to list all groups on a Server

Keywords: groups  on Novell server 

Question:

I want to list all groups on a server, not just for a particular user. Is there a trick to do this? I tried a wildcard, but it failed. Also, I would like to list all users on a server. I want to use these in listboxes, but can't find a way to do it with an extender or otherwise.

Answer:

In Netware 3, we cannot list all users or groups on a server.

In Netware 4, the n4ObjectInfo function may be of help. But you can still do it in the following way:

Write a BAT file that dumps the groups to a file. I don't know the command but it would look something like:

	REM this is LISTGRP.BAT
	nlistgrp /all > c:\temp.txt
Then you have a WinBatch script:
RunWait("LISTGRP.BAT","")
fs=FileSize("C:\temp.txt")
bb=BinaryAlloc(fs)
BinaryRead(bb,"c:\temp.txt")
list=BinaryPeekStr(bb,0,BinaryEODGet(bb))
BinaryFree(bb)
list=strreplace(list,@crlf,@tab)
thisone=AskItemList("Title",list,@tab,@sorted,@single)
Message("Selected Group",thisone)
Now make a shortcut ot PIF file to LISTGRP.BAT that has two very important items checked.
  1. Close Window on Exit
  2. Run as a window (not full screen)
Debug it. Make it work. 100%.

After you have it all working and DEBUGGED!!:
Change the RunWait to RunHideWait in the WBT file so the users don't see it.


Article ID:   W13608
Filename:   List all Groups on a Novell Server.txt
File Created: 1999:04:15:16:55:10
Last Updated: 1999:04:15:16:55:10