Re: ADMIN Password Issues

2000-10-04 Thread Walker, Lesley R

I have the ID and password in a file like this:
id:admin
pw:password

and the script reads them in using these lines:
ID=`grep "^id" $PWFILE |cut -d: -f2`
PW=`grep "^pw" $PWFILE |cut -d: -f2`

(using /bin/sh on Solaris)

and of course the file has 400 permissions.

If I ever have a need for other "secret" information in TSM-related scripts,
it will go into the same file.

> -Original Message-
> From: Lisa Faulconer [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, October 05, 2000 3:31 AM
> To:   [EMAIL PROTECTED]
> Subject:  ADMIN Password Issues
>
> We currently have our ADMIN id and password in several scripts.  Our
> scripts perform a number of functions from redirecting output from the act
> log to a file (AIX) to issuing the DRM commands.  The scripts are
> scheduled
> with the *SM scheduler.
>
> Macros would eliminate the need to have the id and password in a file but
> macros can not be scheduled with the *SM scheduler.
>
> Has anyone addressed this issue?  Appreciate any suggestions.
>
> Lisa



Re: ADMIN Password Issues

2000-10-04 Thread Joe Faracchio

If you're using perl here's a neat subroutine I was given to use:
and again you would refer to them as $pass and $userid
where the file would look like:

$userid=Admin
$password=dontsay

  ... joe.f.
-
###
sub read_prop_file()
###
{
  #
  # read the property or environment file and set the variables in the
  #   file
  #
  # input: fully qualified file name
  #
  # return: None.  Sets key:value pairs contained in file.

  local($ENVFILE) = @_;
  local($env_var,$env_value) = "";

  if ("$ENVFILE" && open (ENVFILE, "< $ENVFILE"))
  {
while ()
{
  next if /^#/;
  next if /^$/;

  if (/([a-zA-Z0-9_]+)\s*=\s*(.*)$/)
  {
$env_var = "$1";
$env_value = "$2";
$env_value =~ s/^"(.*)"$/\1/;
eval "\$$env_var=\"$env_value\"";
  }
}
  }
  else
  {
print "Problem with file $ENVFILE.  Aborting...\n";
exit(1);
  }
  close(ENVFILE);
  return(1);
} #  end of subroutine:  read_prop_file()





Joseph A Faracchio,  Systems Programmer, UC Berkeley


On Wed, 4 Oct 2000, Ford, Phillip wrote:

> In our scripts os scripts we use the following:
>
> cat /etc/adsm/adsm | read usr pw
>
> then
>
> dsmadmc -id=$usr -password=$pw q ses
>
> the file /etc/adsm/adsm is protected from access for general users.  Root
> and one group that would know the password anyway are the only ones that can
> read it.
>
> That is how we do it.
>
>
> --
> Phillip Ford
> Senior Software Specialist
> Corporate Computer Center
> Schering-Plough Corp.
> (901) 320-4462
> (901) 320-4856 FAX
> [EMAIL PROTECTED]
>
>
>
> -Original Message-
> From: Lisa Faulconer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 04, 2000 9:31 AM
> To: [EMAIL PROTECTED]
> Subject: ADMIN Password Issues
>
>
> We currently have our ADMIN id and password in several scripts.  Our
> scripts perform a number of functions from redirecting output from the act
> log to a file (AIX) to issuing the DRM commands.  The scripts are scheduled
> with the *SM scheduler.
>
> Macros would eliminate the need to have the id and password in a file but
> macros can not be scheduled with the *SM scheduler.
>
> Has anyone addressed this issue?  Appreciate any suggestions.
>
> Lisa
>



Re: ADMIN Password Issues

2000-10-04 Thread Ford, Phillip

In our scripts os scripts we use the following:

cat /etc/adsm/adsm | read usr pw

then

dsmadmc -id=$usr -password=$pw q ses

the file /etc/adsm/adsm is protected from access for general users.  Root
and one group that would know the password anyway are the only ones that can
read it.

That is how we do it.


--
Phillip Ford
Senior Software Specialist
Corporate Computer Center
Schering-Plough Corp.
(901) 320-4462
(901) 320-4856 FAX
[EMAIL PROTECTED]



-Original Message-
From: Lisa Faulconer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 04, 2000 9:31 AM
To: [EMAIL PROTECTED]
Subject: ADMIN Password Issues


We currently have our ADMIN id and password in several scripts.  Our
scripts perform a number of functions from redirecting output from the act
log to a file (AIX) to issuing the DRM commands.  The scripts are scheduled
with the *SM scheduler.

Macros would eliminate the need to have the id and password in a file but
macros can not be scheduled with the *SM scheduler.

Has anyone addressed this issue?  Appreciate any suggestions.

Lisa



Re: ADMIN Password Issues

2000-10-04 Thread Nicholas Cassimatis/Raleigh/IBM

Use the admin scheduler (define sched schedname type=admin cmd="macro
macroname"...) to run the macro.

Nick Cassimatis
[EMAIL PROTECTED]

"I'm one cookie away from happy." - Snoopy (Charles Schulz)