#!/usr/local/bin/perl # # $Header: dbaGroupAssign.pl 17-nov-2005.18:28:22 dsukhwal Exp $ # # dbaGroupAssign.pl # # Copyright (c) 2005, Oracle. All rights reserved. # # NAME # dbaGroupAssign.pl - # # DESCRIPTION # # # NOTES # # # MODIFIED (MM/DD/YY) # dsukhwal 11/17/05 - fix for windows # dsukhwal 02/01/05 - dsukhwal_reports2 # dsukhwal 01/27/05 - Creation # use strict; my @mem; if($^O eq "MSWin32"){ require "$ENV{EMDROOT}/sysman/admin/scripts/db/esaUtils.pl"; my $grpName = 'ORA_DBA'; LocalGroupGetMembersWithDomain('127.0.0.1', $grpName, \@mem); } else{ my ($name, $passwd, $gid, $members) = getgrnam("dba"); @mem = split(/ /, $members); } my $i; foreach $i (@mem) { print "em_result=$i|DBA Group|DBA_GROUP\n"; }