IBM i Global

IBM i Global

Connect, learn, share, and engage with IBM Power.

 View Only
Expand all | Collapse all

Automatic Logon

  • 1.  Automatic Logon

    Posted Mon October 30, 2023 03:53 PM
    Exemple
    Exemple2


    ------------------------------
    Roberto Colonnese
    ------------------------------


  • 2.  RE: Automatic Logon

    Posted Tue October 31, 2023 03:17 AM

    Hello everyone,
    I have an automatic logon problem, even though I think I have set the .bat file that I start to run automatically when I start a program you access or excel asks me to enter the password, can anyone help me understand where I'm wrong? I'll add some screenshots, thanks.



    ------------------------------
    Roberto Colonnese
    Marketing
    Colonialsud
    Arzano
    ------------------------------



  • 3.  RE: Automatic Logon

    Posted Tue October 31, 2023 04:09 AM

    I Roberto,

    Are you using an ODBC/OLE DB connection for Excel and Access? If this is the case, you should check if you have not forced the dialog box to be displayed in the configuration of ODBC Driver.

    If you have a Active Directory, the most effective way is to set up an EIM-based SSO.



    ------------------------------
    Dominique Gayte
    ------------------------------



  • 4.  RE: Automatic Logon

    Posted Tue October 31, 2023 04:18 AM

    HI,
    we certainly use odbc to interface the As400 with Access and Excel, this problem arose when I updated to the latest version, before I had Workstation 6.0 and I didn't have this problem, I ran a .bat when starting windows (which I attach) with this .bat managed to automatically insert the credentials and everything worked both on Iseries and on Access and Excel.



    ------------------------------
    Roberto Colonnese
    Marketing
    Colonialsud
    Arzano
    ------------------------------



  • 5.  RE: Automatic Logon

    Posted Tue October 31, 2023 04:19 AM
    Example


    ------------------------------
    Roberto Colonnese
    Marketing
    Colonialsud
    Arzano
    ------------------------------



  • 6.  RE: Automatic Logon

    Posted Wed November 01, 2023 01:50 AM

    Dear Roberto

    Since you are using IBM i ACS, CWBLOGON should no longer work as it belongs to IBM i Access for Windows.   Please try using Netrc file instead as described in item 2 of this IBM Technote: Three Methods by which to by-pass GUI sign on using IBM i Access Client Solutions.at  https://www.ibm.com/support/pages/three-methods-which-pass-gui-sign-using-ibm-i-access-client-solutions.       



    ------------------------------
    Chance favors only the prepared mind.
    -- Louis Pasteur
    ------------------------------
    Satid S.
    ------------------------------



  • 7.  RE: Automatic Logon

    Posted Wed November 01, 2023 01:12 PM

    CWBLOGON is part of the IBM i Access Client Solutions Windows Application Package and you still would use that to cache the default ID and password for the Windows Application Package client (of which the ODBC driver is a part).  

    The screen capture is showing the use of the logon plugin which is part of the java-based client (and of no use to the Windows client).  The logon plugin serves the same purpose in the java client that the CWBLOGON tool does for the Windows client.  

    In order for it to work correctly, the system name that is passed to the cwblogon tool must exactly match the system in the ODBC data source or connection string.  Also the system must be defined to use a default user (and cache password) and the ID passed to the cwblogon tool must match that default ID.  

    The parameters that the ODBC application pass to the the SQLDriverConnect function also play a role in whether or not the cached ID is used.  It could be passing a different ID than the default.  The cwbcotrc tool in the Windows client is the best way to see what the application is passing for for the ODBC connection string and parameters to the SQLDriverConnect function.

    Since the Windows client no longer has a nice GUI tool to view and set your connection settings, I wrote an open source tool to do that which you can get from here:  https://github.com/MikSwens/ACS-WAPConnectionDetails/releases/tag/V1.0



    ------------------------------
    Michael Swenson
    Software Engineer
    IBM
    ------------------------------



  • 8.  RE: Automatic Logon

    Posted Thu November 02, 2023 03:25 AM

    Hi, actually the access and excel tools are from windows so the script I use must not replace the old one but must be an addition, I thought that the old .bat was part of the iseries version that I had previously and that the script had to be replaced, I have now run both the new and old scripts and it works.
    As soon as I can, I'll also try the method recommended by @Satid Singkorapoom to streamline the script.

    Thank you all so much for the support.



    ------------------------------
    Roberto Colonnese
    Marketing
    Colonialsud
    Arzano
    ------------------------------



  • 9.  RE: Automatic Logon

    Posted Wed November 01, 2023 01:56 AM
    Edited by Satid Singkorapoom Wed November 01, 2023 02:33 AM

    Two more points: If you can still run CWBLOGON, it means you still have the old IBM i Access for Windows as well as IBM i ACS in your Windows PC and this may be the cause of the problem you are encountering.  You should uninstall IBM i Access for Windows.

    What JRE in Windows are you using?  If it is not IBM Semeru 17 JRE for Windows, I suggest you switch to this JRE and try your .bat file again.   

    To install IBM Semeru 17 JRE for Windows, download its MSI file and run it for installation. Then you set Windows environment variable named JAVA_HOME to the installed folder path of Semeru JRE such as  JAVA_HOME=C:\Program Files\Semeru\jre-17.0.8.101-openj9.   After this, you should also make sure you see this Env Var from Windows SET command.



    ------------------------------
    Chance favors only the prepared mind.
    -- Louis Pasteur
    ------------------------------
    Satid S.
    ------------------------------



  • 10.  RE: Automatic Logon

    Posted Wed November 01, 2023 02:31 PM

    Hi, unfortunately I'm not a computer scientist, I do graphics, where I work I use As400 to extract food products to make advertising posters, the CWBLOGON no longer works, now I'm using another command
    C:\Users\administrative4\IBM\ClientSolutions\Start_Programs\Windows_i386-32\acslaunch_win-32.exe /PLUGIN=logon /AUTH /SYSTEM=xxx.xxx.xxx.xxx /USERID=xxxxx /PASSWORD=xxxxx /GUI=2
    for automatic access to Iseries without authenticating, but what I really can't automate are external programs like access or excel, I have to enter the password at least once, the user keeps it memorized.
    I am attaching a screen of the information about the iseries that I use where there is also the java version.
    Thank you.



    ------------------------------
    Roberto Colonnese
    Marketing
    Colonialsud
    Arzano
    ------------------------------



  • 11.  RE: Automatic Logon

    Posted Thu November 02, 2023 08:39 AM

    Hi Roberto,

    The "acslaunch_win-32.exe" can authenticate the user for accessing the "greenscreen" and other components of the base Access Client Solutions install.  However it can't authenticate users for ODBC connections.  You do need to use the CWBLOGON for that.  Review the post above by Michael Swenson, he provided a lot of key detail.



    ------------------------------
    Steven Riedmueller
    Certified IBM i Admin
    Speaker, Mentor, and Advocate
    ------------------------------



  • 12.  RE: Automatic Logon

    Posted Thu November 02, 2023 08:37 AM

    Hi Satid,

    To my surprise I learned recently (and Michael Swenson has kindly explained in this thread) that the "CWB" components which you and I both associate with the old A4W software are actually still used in the "Windows Application Package" for ACS!  I too thought that stuff was gone, and that any reference to CWBxxxx indicated that someone/something hadn't been updated since the A4W days.



    ------------------------------
    Steven Riedmueller
    Certified IBM i Admin
    Speaker, Mentor, and Advocate
    ------------------------------



  • 13.  RE: Automatic Logon

    Posted Thu November 02, 2023 10:08 AM

    Hi, that's right, I also had to insert the old instruction for windows, by doing so I solved it, thanks everyone.



    ------------------------------
    Roberto Colonnese
    Marketing
    Colonialsud
    Arzano
    ------------------------------