[BlueOnyx:22674] Re: exporting all users to CSV
Janwillem Ronken
jw at veritekglobal.eu
Thu Feb 7 05:17:16 -05 2019
Hi Michael
Many thanks! I’ll give it a try.
regards
janwillem
From: Blueonyx <blueonyx-bounces at mail.blueonyx.it> on behalf of Michael Aronoff <maronoff at gmail.com>
Reply-To: BlueOnyx General Mailing List <blueonyx at mail.blueonyx.it>
Date: Thursday, 7 February 2019 at 11:12
To: 'BlueOnyx General Mailing List' <blueonyx at mail.blueonyx.it>
Subject: [BlueOnyx:22673] Re: exporting all users to CSV
Janwillem wrote:
If I remember well it was possible in the past in 5106R to export all users to CSV
I have a perl script that would export a list of all usernames on the server. If I remember I still had to edit the file a tiny bit but it did a good job. I have not tried this in a while but it did work on my 5208 the last time I tried it.
Here is the script.
#!/usr/bin/perl -I/usr/sausalito/perl
# Author: Brian N. Smith
# Copyright 2008, NuOnce Networks, Inc. All rights reserved.
# $Id: get_user_email.pl v1.0 2008/01/28 23:18:00 Exp $
# use command below to run and output to file.
# ./get_user_email.txt > maillist.txt
use CCE;
my $cce = new CCE;
$cce->connectuds();
@all_virtual_sites = $cce->find("Vsite");
foreach $vsite_oid(@all_virtual_sites) {
my ($ok, $vsite) = $cce->get($vsite_oid);
$fqdn = $vsite->{'fqdn'};
$fqdn =~ s/www.//g;
$fqdn =~ s/mail.//g;
@all_users = $cce->find("User", {'site' => $vsite->{'name'}});
foreach $user_oid(@all_users) {
my ($ok, $user) = $cce->get($user_oid);
$username = $user->{'name'};
print $username . "@" . $fqdn . "\n";
}
}
______________________________
M Aronoff Out – maronoff at gmail.com
I'm a great believer in luck, and I find the harder I work the more I have of it.
- Thomas Jefferson
_______________________________________________
Blueonyx mailing list
Blueonyx at mail.blueonyx.it
http://mail.blueonyx.it/mailman/listinfo/blueonyx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20190207/47791ec6/attachment.html>
More information about the Blueonyx
mailing list