使用 Base SAS 验证 Windows 密码

发布于 2024-07-15 10:35:20 字数 250 浏览 9 评论 0原文

我们有一个登录脚本,需要 Windows 密码才能访问 SAS 元数据服务器并进行验证。

问题是,如果 Windows 密码被更改,并且脚本在没有更新的情况下运行了几次,那么用户将被锁定,并且必须致电 IT 支持人员重置密码。

使用 Base SAS (9.1.3) 验证 Windows 密码的最简单方法是什么? 即如果提供的密码无效,则向用户发出警告...

编辑:

关心的不是是否应该这样做,而是如何完成!

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 (9.1.3) 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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

失与倦" 2024-07-22 10:35:20

听起来该解决方案与 Windows 密码和您的 IT 团队有关。 大多数具有您所描述的计划作业的项目都在具有有限权限和静态密码的特定用户下运行。

我相信您的解决方案属于 IT 部门,而不是复杂的 SAS 登录脚本。

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.

萝莉病 2024-07-22 10:35:20

您使用的是 SAS 9.2 吗? 如果是这样,您是否可以使用不需要底层主机操作系统帐户并且可以配置自定义过期规则的内部帐户?

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?

寻找我们的幸福 2024-07-22 10:35:20

好的,您可以使用标志轻松检查这一点。 如果该标志为“on”,则 SAS 将不会运行该脚本。 如果标志为“关闭”,SAS 将继续运行脚本。 这将解决重置密码的问题。 至于您选择如何将其传达给用户,则取决于您。

伪代码中的 EG sas 脚本:

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;

干杯

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文