- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Anyone have a simple script to list all users ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 08:13 AM
04-15-2004 08:13 AM
Anyone have a simple script to list all users by account?
Anyone have one?
Vic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 08:55 AM
04-15-2004 08:55 AM
Re: Anyone have a simple script to list all users by account?
ftp://ftp.process.com/vms-freeware/fileserv/uaf.zip
or
ftp://ftp.process.com/vms-freeware/fileserv/scanuaf.zip
Martin can probably write on in perl :-)
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 09:01 AM
04-15-2004 09:01 AM
Re: Anyone have a simple script to list all users by account?
As you have no doubt discovered, the show command in authorize does not have a /account capability.
If a brief listing is okay, then use the following:
$ set default sys$system
$ define/user sys$output sys$login:a.txt
$ mcr authorize show/brief *
$ sort sys$login:a.txt-
/key=(num=1,pos=51,size=8)-
/key=(num=2,pos=22,size=15) sys$login:b.txt
b.txt will be your listing sorted by account field and usernames within that account field.
Hope it helps,
john
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 09:47 AM
04-15-2004 09:47 AM
Re: Anyone have a simple script to list all users by account?
But the point here is that it's a fairly trivial string parsing exercise and shouldn't take long in whatever language your comfortable. Note that there's only one continuation line here and this may be wrapped:
$ pipe mcr authorize show/br * | perl -e -
"while (<>) {$a{substr($_,50,8)} .= (substr($_,21,12).' ');} for $k (sort keys %a) {print qq{$k $a{$k}\n};}"
Account Username
DECNET SCA$DEFAULT SCA$SERVER
DECNETV CML$SERVER MAIL$SERVER MIRRO$SERVER PHONE$SERVER VPM$SERVER
SYSTEM SYSTEM
TCPIP TCPIP$DHCP TCPIP$FTP TCPIP$NTP TCPIP$SMTP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 02:34 PM
04-15-2004 02:34 PM
Re: Anyone have a simple script to list all users by account?
Vic..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 02:34 PM
04-15-2004 02:34 PM
Re: Anyone have a simple script to list all users by account?
well you were asking for it ;-) Since Craig already covered the filter approach, here is a variation using on of the many useful VMS Perl modules. Note: For the specific task at hand (account), this might be even slightly more complex than Craigs example, but the solution is much more general, since you can query pretty much all the fields of UAI that way. For a list of the supported fields and another example check the attached Zip archive.
TIMTOWTDI ;-)
use VMS::User;
@users = VMS::User::user_list();
printf "%-30s %-30s\n", "Username", "Account";
for($i=0;$i<=@users;$i++){
unless ($users[$i] eq "" or $users[$i] eq "Username"){
$uairef = VMS::User::user_info($users[$i]);
printf "%-30s %-30s\n", $users[$i], $uairef->{ACCOUNT};
}
}
VMS::User is available via CPAN (and part of the Perl on the latest freeware CD).
Cheers, Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 06:37 PM
04-15-2004 06:37 PM
Re: Anyone have a simple script to list all users by account?
http://vmspython.dyndns.org/docs/python_vms/reference_manual_003.html#bottom_003
search for
example_rms.py
A slight modification will give you what you want.
Regards
Gerard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 07:45 PM
04-15-2004 07:45 PM
Re: Anyone have a simple script to list all users by account?
And also in all other show commands availble in OpenVMS.
I dream of
$ show sys/sel=(cpu=min=10:00,account=ME*)
This makes /own /proc etc obsolete.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 08:25 PM
04-15-2004 08:25 PM
Re: Anyone have a simple script to list all users by account?
Speaking of UAF selections:
How about something like:
UAF> Modify * /param=value where param < value
or
UAF> Modify * /params=value where ident_held = IDname [ .AND. param < value ]
Of course max-values i.o. min-values also.
If the intro or change of an app requires upping some value, just UAF mod * will DEcrease the few accounts that need a still higher value for some other reason.
For a SYSUAF of > 10 K accounts doing a check & change for each account is really funny. ;-D
(we have some DCL for it, but is a REAL performance killer, and it is too heavily dependant on site-specific standards to be readily spread. For some months now I plan to find some low-activity hours to generalise it and put it into OPENVMS.DCL, but it proves not THAT simple, and more urgent things keep coming up)
:-)
I know, I know, SYSGEN PQL_Mxxx can help you, but that also has drawbacks.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2004 09:44 PM
04-15-2004 09:44 PM
Re: Anyone have a simple script to list all users by account?
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2004 01:15 AM
04-16-2004 01:15 AM
Re: Anyone have a simple script to list all users by account?
http://h71000.www7.hp.com/openvms/freeware/
There is a PCSI kit for Alpha released by OVMS Engineering as part of their web serving suite:
http://h71000.www7.hp.com/openvms/products/ips/apache/csws_perl_relnotes.html
There are assorted binary kits from:
http://www.sidhe.org/vmsperl
or, if you have DEC C, you can build from source, which is available from
http://www.cpan.org/src/
To join a low-volume mailing list on the development and support of Perl on VMS, send mail to
vmsperl-subscribe AT perl DOT org
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2004 04:03 AM
04-16-2004 04:03 AM
Re: Anyone have a simple script to list all users by account?
sounds reasonable, I shall see what I can do. This will not be ready before Monday though.
Greetings, Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2004 06:37 AM
04-16-2004 06:37 AM
Re: Anyone have a simple script to list all users by account?
ease down.
No hurry. We DO have a working DCL for it, and we need it maybe twice a year (btw, it does SHOW as well as MODIFY), but it is NOT (yet) fit for environments that do not conform to our standards.
For instance: it assumes that EVERY account-name is also an identifier with RESOURCE attribute, and a [nnnnn,*] UIC value;
every account HAS a named UIC of format [account-name,username]. THAT is we I didn't post it (yet).
Then again, maybe you SHOULD post it, I am not the only one that would profit :-)
Jan