List users from command line?

All those commands that we don't really use very often, but that we should ! Documented or not, they worth it !
Post Reply
cwsonline

List users from command line?

Post by cwsonline »

What is an simple way to dump all the users from the command line? I have used >listerm in the past but this will only show users that have assigned equipment. I've used >ednump and >cuser to pull out the users that way but for scripting purposes I would like to keep it to a simple command or query from the command line. I have also looked into using a ctree module from Perl but I have had trouble getting a perl interpreter to run well on the OXE. Any ideas would be apprecitated.
sadim
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 698
Joined: 02 Jun 2006 07:11
Location: Portugal

Post by sadim »

Try the command
strings /usr3/mao/PHONEBM.dat

instance of strings, you can user other cmds like grep to filter the information and have other output layout

Regards
mgoegel
Member
Posts: 250
Joined: 12 Feb 2007 12:18
Location: Germany

Post by mgoegel »

much better:

edsbr <return>
dir <return>
name <return>
type <return>
go <return>
bye <return>
cwsonline

Post by cwsonline »

Thank you. That has given me some good ideas. Instead of using the Phone Book table I used the POSTE table to look at only the local users. We have large networks here and I wanted to only see the local users. I am looking at something like:

strings /usr3/mao/POSTEM.idx | grep -E '^[[:digit:]]' | sort | uniq

I found that using POSTEM.dat didn't give an 'up-to-the-moment' view of the users. I do end up with a couple garbage characters at the end of my extension numbers but I can remove those easily in my script. This also includes my hunt group number but isn't a problem. Thank you for the ideas!
andi

Post by andi »

How about using the ippstat tool?

You can start it without any argument or list some arguments with "ippstat ?" in the CLI. ippstat is imho a very powerfull tool.

best regards
User avatar
frank
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 3390
Joined: 06 Jul 2004 00:18
Location: New York
Contact:

Post by frank »

ippstat --help will give you some help if you want to use command line only
Code Free Or Die
MasterB

Re: List users from command line?

Post by MasterB »

Hey,

try some comments with list*
lata

Re: List users from command line?

Post by lata »

I use command

> ednump
> dir
> mean
> go

which prints out all numbers with its information

BR Lata
Post Reply

Return to “Usefull commands”