BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
flachboard_84
Calcite | Level 5
Sweet! I'm good to go now. Thanks a ton!
sastpw
SAS Employee

Sure thing, glad you're up and running!

 

Can you change your accepted answer to the correct one, just so if others search on this they don't go down the wrong path?

I appreciate it! (I can't change it)

 

Thanks!,

Tom

imlearningsas
Fluorite | Level 6
I GOT THIS ERROR
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last) <ipython-input-15-82631ef24263> in <module> 4 5 import saspy ----> 6 from CONFIG.sasconfig import username, password ModuleNotFoundError: No module named 'CONFIG'
sastpw
SAS Employee

Hey, yes, you can simply put your credentials in an authinfo file and then specify the key for that in your config. See the doc here:

https://sassoftware.github.io/saspy/install.html#iom-using-java

and scroll down to the authinfo part. Well, I'll cut-n-paste that next. You use the 'authkey' in your configuration definition to specify which credentials to use. You can have different credentials for different connections.

 

 

 

The IOM access method now has support for getting the required user/password from an authinfo file in the user’s home directory instead of prompting for it. On linux, the file is named .authinfo and on windows, it’s _authinfo. The format of the line in the authinfo file is as follows. The first value is the authkey value you specify for authkey. Next is the ‘user’ key followed by the value (the user id) and then ‘password’ key followed by its value (the user’s password). Note that there are permission rules for this file. On linux the file must have permissions of 600, only the user can read or write the file. On Windows, the file should be equally locked down to where only the owner can read and write it.

authkey user omr_user_id password omr_user_password

So, for a Configuration Definition that specifies the following authkey:

'authkey' : 'IOM_Prod_Grid1',

The authinfo file in the home directory for user Bob, with a password of BobsPW1 would have a line in it as follows:

IOM_Prod_Grid1 user Bob password BobsPW1

 

Thanks,

Tom

 

flachboard_84
Calcite | Level 5

I have another follow up question. I recently had to update my password, and now I can no longer establish a connection to SAS. It says that my user name or password may be incorrect. However, I updated my password in the files you advised me to create. Any idea what the issue might be? I've even tried uninstalling and reinstalling SASPy.

sastpw
SAS Employee

Was the password you had to update your SAS Metadata password, or a password for some other account?

The user/password in the authinfo file are the credentials you use to authenticate to OMR. I don't know if those

credentials are the same as the one you had to change. 

 

1 - try putting the pw back as it was in the authinfo file.

2 - try removing the authkey and see if you get prompted for credentials, and see if either pw works.

 

uninstalling/reinstalling saspy wouldn't have any effect on any of this. I'm guessing you didn't change your OMR pw, but rather some other account, so changing it in the authinfo file is the problem. But I don't have any information to really know wither way.

 

Tom

flachboard_84
Calcite | Level 5
My apologies. There was also an _authinfo file on my C drive that I had forgotten to update. Thanks for your help!
sastpw
SAS Employee

Good deal. Yes, on windows, the file starts with an underscore, while on linux it starts with a dot:

win - _authinfo   (no file extension!)

linux - .authinfo   (permissions 600)

 

Glad you'r back up!

Tom

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 22 replies
  • 4974 views
  • 0 likes
  • 4 in conversation