• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • When Good Batch FTP Users Go Bad

    October 2, 2002 Timothy Prickett Morgan

    Hey, Joe:

    I set up a Windows batch FTP script to automatically transfer files from my iSeries box to a Windows desktop. I set up this transfer to occur every Friday evening. This week, the batch transfer stopped working because the remote OS/400 FTP server rejected the FTP user profile and password in the script. The strange thing is that the OS/400 FTP user profile is still enabled on the server. Any ideas what’s happening here?

    — Al

    To get an idea of what’s going on, let’s examine the following sample Windows batch FTP script from a recent article on batch FTP, “FTP Basics: Batch Processing,” by Shannon O’Donnell, and I will use that example to explain what’s happening.

    open YourIPAddress
    AS400UserID
    AS400Password
    get /QSYS.LIB/QGPL.LIB/QRPGLESRC.FILE/PROOF.MBR  C:Proof.txt
    quit
    

    Like many client/server programs, this script opens an FTP session, passes in a valid OS/400 user profile and password, and then transfers the file to a Windows directory. More than likely, your problem is that your AS/400 FTP user password was automatically expired because it passed the expiration time interval set up in the Password expiration interval system value (QPWDEXPITV). When the batch FTP runs and attempts to sign on with this user, OS/400 won’t allow it because it considers the password expired and the FTP session fails.

    Many shops set QPWDEXPITV to a fairly low time value–such as 30 days–which complicates matters in this case, because the password is used weekly for unattended processing, and it’s fairly awkward to change your script every month. One answer is to override the QPWDEXPITV value for this user by changing the user profile’s individual password expiration interval to never expire. You do this by using the Change User Profile (CHGUSRPRF) command to set the Password Expiration Interval (PWDEXPITV) parameter to *NOMAX, as shown here:

    CHGUSRPRF USRPRF(ftp_user_name) PWDEXPITV(*NOMAX)
    

    Setting PWDEXPITV to *NOMAX tells OS/400 to ignore QPWDEXPITV processing for this particular user and let the password stay active even if it should be expired according to the system. And once you make this change, I suspect your batch FTP transfer will start working again.

    The unfortunate thing about this solution, and most client/server solutions, is that you’re forced to leave an active OS/400 user profile and password sitting around in a script on another server, where it may be discovered by hackers. There’s no getting around the necessity for embedding passwords in these types of programs. However, you can set the following OS/400 user profile parameters for your FTP user to minimize damage if someone discovers the password and tries to sign on as that user.

    • Set the FTP user’s User Class (USRCLS) parameter to *USER, so he has no special authorities on systems using security level 30 or above.
    • Set the Initial Program to Call (INLPGM) parameter to *NONE so that no initial program is called if the user is able to sign on.
    • Set the Initial Menu (INLMNU) parameter to *SIGNOFF so OS/400 will automatically sign off the FTP user if the user is ever able to sign on to a terminal session.
    • Set the Limit Capabilities (LMTCPB) parameter to *YES so the user cannot change the program, menu, current library, and run commands, select commands from a menu, and use or change the Attention (ATTN) key program from a green screen.

    Similar to setting the PWDEXPITV parameter to *NOMAX, prompt the CHGUSRPRF command to change these values for your user.

    In addition, be sure the FTP user has no authority to any OS/400 or IFS object other than what is needed for its batch FTP transfer. This will protect your other OS/400 objects.

    Client/server situations are problematic because of potential password exposure issues. However, if you lock down your FTP user profiles, you can limit the potential for abuse and make the situation somewhat (but not perfectly) safe.

    I hope this helps.

    — Joe

    Sponsored By
    RJS SOFTWARE SYSTEMS

    Implement Document Imaging on your iSeries-AS/400 in 30 minutes or less

    Image Server/400 is a Web browser-based document image management system for the iSeries.

    Documents can be quickly scanned and stored in IFS folders, and then located and retrieved for viewing via any Web browser. Integrate with other iSeries-AS/400 applications.

    Visit us at COMMON, Booth 418, call us at 888-RJS-SOFT, or download a FREE fully functional demo from our Web site at

    www.rjssoftware.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: mgo_rc, Volume 2, Number 75 -- October 2, 2002

    Sponsored by
    DRV Tech

    Get More Out of Your IBM i

    With soaring costs, operational data is more critical than ever. IBM shops need faster, easier ways to distribute IBM applications-based data to users more efficiently, no matter where they are.

    The Problem:

    For Users, IBM Data Can Be Difficult to Get To

    IBM Applications generate reports as spooled files, originally designed to be printed. Often those reports are packed together with so much data it makes them difficult to read. Add to that hardcopy is a pain to distribute. User-friendly formats like Excel and PDF are better, offering sorting, searching, and easy portability but getting IBM reports into these formats can be tricky without the right tools.

    The Solution:

    IBM i Reports can easily be converted to easy to read and share formats like Excel and PDF and Delivered by Email

    Converting IBM i, iSeries, and AS400 reports into Excel and PDF is now a lot easier with SpoolFlex software by DRV Tech.  If you or your users are still doing this manually, think how much time is wasted dragging and reformatting to make a report readable. How much time would be saved if they were automatically formatted correctly and delivered to one or multiple recipients.

    SpoolFlex converts spooled files to Excel and PDF, automatically emailing them, and saving copies to network shared folders. SpoolFlex converts complex reports to Excel, removing unwanted headers, splitting large reports out for individual recipients, and delivering to users whether they are at the office or working from home.

    Watch our 2-minute video and see DRV’s powerful SpoolFlex software can solve your file conversion challenges.

    Watch Video

    DRV Tech

    www.drvtech.com

    866.378.3366

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Find the Cursor Position in a CL Program Reader Feedback and Insights: A Timely OPNQRYF Tip

    Leave a Reply Cancel reply

MGO Volume: 2 Issue: 75

This Issue Sponsored By

    Table of Contents

    • Reader Feedback and Insights: Displaying Menu Options
    • FTP and Save Files
    • When Good Batch FTP Users Go Bad

    Content archive

    • The Four Hundred
    • Four Hundred Stuff
    • Four Hundred Guru

    Recent Posts

    • Meet The Next Gen Of IBMers Helping To Build IBM i
    • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
    • Will Independent IBM i Clouds Survive PowerVS?
    • Now, IBM Is Jacking Up Hardware Maintenance Prices
    • IBM i PTF Guide, Volume 27, Number 24
    • Big Blue Raises IBM i License Transfer Fees, Other Prices
    • Keep The IBM i Youth Movement Going With More Training, Better Tools
    • Remain Begins Migrating DevOps Tools To VS Code
    • IBM Readies LTO-10 Tape Drives And Libraries
    • IBM i PTF Guide, Volume 27, Number 23

    Subscribe

    To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

    Pages

    • About Us
    • Contact
    • Contributors
    • Four Hundred Monitor
    • IBM i PTF Guide
    • Media Kit
    • Subscribe

    Search

    Copyright © 2025 IT Jungle