views:

173

answers:

3

We have a signon script that requires a Windows password in order to access and validate against the SAS metadata server.

The problem is that if the windows password is changed, and the script is run a few without being updated, then the user gets locked out and has to call IT support for a password reset.

What is the simplest way of using Base SAS to validate a windows password? ie to enable a warning to the user if the password provided is not valid...

EDIT:

The concern is not whether or not this SHOULD be done, only HOW it could be done!

A: 

It sounds like the solution has to do with Windows passwords and your IT group. Most of the projects that have scheduled jobs like you describe run under a specific user that has limited permissions and a static password.

I believe that your solution lies within the IT dept and not a sophisticated SAS log-on script.

AFHood
A: 

Are you using SAS 9.2? If so, could you use internal accounts which do not require an underlying host operating system account and can be configured with custom expiration rules?

Zach
A: 

Ok you can check this quite easily using flags. If the flag is 'on' then SAS will not run the script. If the flag is 'off' SAS will proceed to run the script. This will stop the problem of having your password reset. As to how you choose to communicate that to the user, that is up to you.

EG sas script in pseudocode:

if flag_is_on then do;
  communicate message password is invalid; ** THIS IS OPTIONAL.  YOU COULD JUST KEEP THE NOTIFICATION BELOW AND REMOVE THIS ONE. OTHERWISE YOU WILL RECEIVE MULTIPLE NOTIFICATIONS;
  endsas; ** QUITS SAS. NOTHING ELSE IS RUN;
end;
else do;
  flag_is_on = 1;
  run the rest of your program including login attempt;

  if program_ran_successfully then do; ** POSSIBLY USE SYSERR AND SYSMSG TO DETERMINE THIS?;
    flag_is_on = 0;  ** TURN FLAG OFF AGAIN;
  end;
  else do;
    communicate message password is invalid;
    ** NOTE THAT WE LEAVE THE FLAG TURNED ON HERE SO THAT NEXT TIME THE PROGRAM IS LAUNCHED THE FLAG WILL STILL BE ON AND THE PROGRAM WILL NOT RUN.;
  end; 
end;

Cheers Rob

Rob Penridge