Thanks, all.
I need to be able to show out IT Co-Ordinator which students are
members of which groups, in this case, students who have been banned
from using the internet.
In the end I created a batch file which lists the various groups and
members, and echoes its output to a text file. Then I made a ZEN app
that starts notepad.exe with the text file as it's 'parameter', and made
the bacth file run as a pre-launch program. So when he runs it he gets
the latest details every time.
There's 100 prettier ways to do this better, but I needed it to be
quick and reliable, so I'm pretty happy with the end result.
(In the end I decided to use the 'NLIST /co "context"' rather than
change my edir context using cx)
Thanks again to all who replied.
Michael Mollard
Information Systems Administrator
molm@xxxxxxxxxxxxx
Clairvaux MacKillop College
Brisbane Australia.
http://www.cvxmck.edu.au
Ph 07 33474607 (direct) / 07 33498977
Fax 07 3349 5677
Local Area Network in Australia: the LAN down under.
>>>
From: jglennie@xxxxxxxxxxxxxxxxxxxx
To: <novellschools@xxxxxxxxxxxxxxxxxxxxxxxxx>
Date: 8/03/2006 10:13:21 am
Subject: Re: [NovellSchools] Quick question
Hi
You may need to use CX too. Like dos cd but for context.
cx is usually at 'O'
so if
[root]
O=AA
OU=group
then I expect CX to show AA
cx group will change level and then show
group.AA
then run nlist as below - assuming this is where the group you want to
list lives...
As you know all this can be run in a batch file for many CX and NLIST
group with output piped to a file, assuming you add to the file :).
Emailing eggs for the sucking on?
Regards
John Glennie CNE B.Agr.Sci
Network Engineer
Marymount College
0439-798-507
direct 07-5586-1091
switch 07-5586-1000
fax 07-5576-2511
jglennie@xxxxxxxxxxxxxxxxxxxx
>>> MolM@xxxxxxxxxxxxx 08-Mar-06 8:28:27 am >>>
Much thanks, Wayne.
Michael Mollard
Information Systems Administrator
molm@xxxxxxxxxxxxx
Clairvaux MacKillop College
Brisbane Australia.
http://www.cvxmck.edu.au
Ph 07 33474607 (direct) / 07 33498977
Fax 07 3349 5677
Local Area Network in Australia: the LAN down under.
>>>
From: wdoust@xxxxxxxxxxx
To:Novell Schools < novellschools@xxxxxxxxxxxxxxxxxxxxxxxxx >
Date: 8/03/2006 1:28:58 am
Subject: Re: [NovellSchools] Quick question
On Tue, 2006-03-07 at 15:02 +1000, Michael Mollard wrote:
Hi all,
I've had a mental blank. I need to list all members of an edirectory
group, from the command line. NLIST or similar.
Can anyone help me out?
Thanks.
NLIST GROUP=<groupname> SHOW MEMBERS
will do the trick as will
NLIST USER WHERE "GROUP MEMBERSHIP" = <groupname>
but only for users in the current context - which may be what you
want.
NLIST GROUP=* /d
will list all the details of all groups in that context
NLIST GROUP WHERE MEMBER EQ <username>
Will list all the groups in the current context that have <username>
as
a member.
Of course, my favourite NLIST command is:
NLIST USER /A
With a judicious use of scripting, NLIST can be a powerful real time
network monitoring tool. For example, piping the output of the
previous
command through GREP with a list of 'targeted' logins can alert you
when
particular people login and logout. Running NLIST * /d and sending the
output to a file with the current date allows you to do a quick
compare
for any NDS changes made from day to day. A continuously running
script
with an errorlevel trap piped to sendmail can alert you immediately of
any NDS changes on "monitored" contexts. All this can be done with a
few
short lines of self-modifying code.
HTH,
Wayne
--
Wayne Doust < wdoust@xxxxxxxxxxx >
|