If you use ODBC your DSN definition in ~/.odbc.ini can include the lines:

System = *LOCAL
UserID = *CURRENT


Jack Woehr
Independent Consulting Programmer

[icon] 303-847-8442<tel:303-847-8442>

[icon] jack.woehr@xxxxxxxxxxx<mailto:jack.woehr@xxxxxxxxxxx>

[icon] www.procern.com<https://www.procern.com>

[icon] Stay Connected!<https://www.linkedin.com/company/procern-technology-solutions/>

[photo]
Upgrade your IT state of mind!<https://procern.com/24-7-monitoring-itil-management/>

NON-DISCLOSURE NOTICE: This communication including any and all attachments is for the intended recipient(s) only and may contain confidential and privileged information. If you are not the intended recipient of this communication, any disclosure, copying further distribution or use of this communication is prohibited. If you received this communication in error, please contact the sender and delete/destroy all copies of this communication immediately.


[__tpx__]

________________________________
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Darren Strong <darren@xxxxxxxxx>
Sent: Monday, May 11, 2026 11:17
To: midrange-l General Questions (midrange-l@xxxxxxxxxxxxxxxxxx) <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Python and passwords

I'm trying out python to generate Spreadsheet and HTML file output on our IBM i. The big issue I ran into was that the ibm_db set of imports to access data on the DB2 for I database, requires a username and password. There is an option to embed this in an environment variable, but that still requires storing my or some other users password and maintaining that. Is there something I'm missing, where a Python script can access db2 data while running on the IBM I without separate credentials? I'd like to use something like username=*current.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.