Home > Ask the AS/400 Experts > iSeries Security Questions & Answers > FTP user profile and password
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

FTP user profile and password

Carol Woodbury EXPERT RESPONSE FROM: Carol Woodbury

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 05 September 2002
Everything I see with FTP requires a user profile and password. I would prefer not to have this hard coded in the PC batch file, CLP, etc. What are some alternatives?

>

I'll tell you the way I do it. There are other ways, but I've found this method to be quite effective.

I store the FTP user ID and the FTP password in a secured data area. A user space would be another good choice.

I build the FTP session commands (or FTP Script) on the fly using an RPG or COBOL program, and store the session commands in a file in QTEMP.

I put a CL program wrapper around the whole thing, and it works nicely. The CL program must be secured, and adopt enough authority to read the Data Area.

The script for a simple file transfer is rather straightforward. Here's what typically on each line, and what your COBOL or RPG Program needs to build.

Line 1
FTPUSERID FTPPASSWORD
Line 2
PUT MYLIB/MYFILE YOURFILE
Line 3
QUIT

Here's the main slice of the CL code I use.

-----------------------------------------------------------------------

 
              CRTSRCPF   FILE(QTEMP/INPUT) MBR(INPUT)

              MONMSG CPF0000 Exec(Do)

                 CLRPFM     FILE(QTEMP/INPUT) MBR(INPUT)

              EndDo

 

              CRTSRCPF   FILE(QTEMP/OUTPUT) MBR(OUTPUT)

              MONMSG CPF0000 Exec(Do)

                 CLRPFM     FILE(QTEMP/OUTPUT) MBR(OUTPUT)

              EndDo

 

              OVRDBF     FILE(INPUT) TOFILE(QTEMP/INPUT) +

                                    MBR(INPUT)

 

              RTVDTAARA  DTAARA(FTPUSER (1 10)) RTNVAR(&FTPUSER)

              RTVDTAARA  DTAARA(FTPUSER (11 10)) RTNVAR(&FTPPASS)

 

              /* Build FTP Script  parameters are USERID and PASSWORD
*/                                    
             CALL       BUILDFTP PARM(&FTPUSER &FTPPASS)   /* Add
records to file QTEMP/INPUT  */            
 

             OVRDBF     FILE(OUTPUT) TOFILE(QTEMP/OUTPUT) +             
                                     MBR(OUTPUT)

                                                                        
            /* Do The FTP  SESSION */

           FTP RMTSYS(MYSYSTEM)

           /* Print the actual FTP session data for diagnostic purposes
*/                             
           CPYF FROMFILE(QTEMP/OUTPUT) TOFILE(*PRINT) 

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: Tips, tutorials and more.

Search400.com's targeted search engine: Get relevant information on security.

Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.

Read this Search400.com Featured Topic: Secure your iSeries


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
iSeries system and application security
Developing a security incident response system for System i
Setting up security for programmers on IBM i
Blocking AS/400 DB2 users
Trouble accessing IFS path from Win2k3 server
Checking in on your IBM i authorization lists
Strategies for securing IBM i production files
Changing password security levels and upgrading operating systems on the IBM i
Determine the value of parameter UPPWEI in the DSPUSRPRF field
Define journal code value "K"
Modify content within a journal receiver file

iSeries Security
Changing password security levels and upgrading operating systems on the IBM i
Determine the value of parameter UPPWEI in the DSPUSRPRF field
Define journal code value "K"
Modify content within a journal receiver file
Change password parameters on the AS/400 without deactivating user's passwords
Prevent insiders with *READ or *USE access from circumventing object authority on IBM i
Prevent insiders from obtaining user ids and passwords on the IBM i
Change the IBM i system to allow only certain types of SSL protocol versions
Authorize a specific user to select files in a separate library
Allow a user to view a library prod without granting full access to all data

FTP
How to view source files in the library
Simplify the process of converting a spool file from iSeries into an Excel spreadsheet
Generically send a text file from the IFS via FTP
Automate Client Access to find files on Windows scheduler
SAVF by FTP on AS/400 -- error "source file not found"
Use a virtual directory to move a .bmp file from the IFS to a remote server to run a software package
Transferring binary files to IFS from a PC via FTP
FTP from AS/400 to PC folder
How to FTP without knowing the file name
IFS folder error

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
midrange  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts