BookmarkSubscribeRSS Feed
bmsampath
Obsidian | Level 7

Hi All,

 

I need your inputs in retrieving the login password in encoded format.

 

I know we can use &sysuser to retrieve the login user. But for one requirement, we need to capture the login password as well.

 

Could you please let me know if you have any idea on this.?

 

I got the below code to retrieve the user/password for authentication domain..I think it wont be helpful for my requirement..

 

%macro Auth(AuthenticationDomain);
%global Password UserID;
data _null_;
   length uri UserId Password UserId AuthId AuthenticationDomain $256;
   rc=metadata_getnobj("omsobj:AuthenticationDomain?@Name='&AuthenticationDomain'",1,uri);
   rc=metadata_getattr(uri,"Id",AuthId);
   rc=1;
   tn=1;
do while(rc>0);
    rc=metadata_getnasn("OMSOBJ:AuthenticationDomain\"!!AuthId,"Logins",tn,uri);
     if rc>0 then do;
        arc=metadata_getattr(uri,"UserID",UserID);
        arc=metadata_getattr(uri,"Password",Password);
        call symput("UserID",compress(UserID));
        call symput("Password",compress(Password));
     end;
     tn=tn+1;
end;
run;
%put NOTE: For AuthenticationDomain &AuthenticationDomain., the UserID &UserID has password &Password.. Executed as &sysuserid..;
%mend;

%Auth(Oracle_BII)

 

 

Thanks,

Sampath

1 REPLY 1
Kurt_Bremser
Super User

DefaultAuth (and other authentication domains apart form @saspw) points to an outside authentication source (the operating system, LDAP, Kerberos, ...). At login, the entered password is checked with a call to that. Never is an encoded password sent back to SAS. No proper authentication source will ever reveal an encoded password, as that would be a severe security hole.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 2643 views
  • 3 likes
  • 2 in conversation