Article

penguin_roar's picture
article
Reads:

5507

Score:
2.666665
2.7
3
 
Comments:

1

Seeing Who's Logged in on your OES Server

(View Disclaimer)

Problem:

It's sometimes a bit hard to see which users are logged onto an Novell Open Enterprise server. Looking in remote manager can sometimes be a bit confusing as it shows many connections that are not used.

Solution:

By using this script you see which users are really logged on and how many there are logged into eDir on the server its ran at.

Example:

#!/bin/sh
# This is a script that shows what users and how many are logged into a open enterprise server.
clear
echo "These users are logged in right now:"
# The command below uses ncpcon to list all connections to the server. We then grep CN, NOT LOGGED IN to weed out some unwanted connections.
# cut -f 2 cuts out the part we want. We then use sort to get it nice and tidy for removing duplicate entries with uniq and lastly we use 
# grep to remove entries with a * infront of them. wc -l counts lines wich tells us how many users there are.
ncpcon connection list | grep CN | grep -v NOT | cut -f 2 | sort | uniq -i | grep -v [*]
echo " "
echo " "
echo "It is `ncpcon connection list | grep CN | grep -v NOT | cut -f 2 | sort | uniq -i | grep -v [*] | wc -l` users logged in at this moment."
echo " "
echo " "

Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

rpiercey's picture

For eDir Login use ndstrace

Submitted by rpiercey on 11 December 2007 - 6:04am.

If you want only edirectory login list you can use

ndstrace -c connections | grep "VALID|AUTHEN" |grep -v SERVERS

© 2013 Novell