LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-16-2016, 10:43 PM   #1
azheruddin
Member
 
Registered: Dec 2011
Posts: 91
Blog Entries: 1

Rep: Reputation: Disabled
AIX to linux migration


Hi,
recently we have migrated our current AIX server to Linux, we have lot of shell script, few of them are FTP scripts.

we have copied the complete AIX file system to linux 7.2 as it is.
could you please highlight what are the things we need to look into it .

in AIX we are using .netrc to store all FTP destination details servername,userid, password ...etc, will .netrc work in linux environment , if not what is the replacement of this file.

also please highlight the areas which we really need to look in terms after migration , currently we have just migrated our TEST box.


Thank you in advance.
 
Old 11-17-2016, 04:52 AM   #2
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 97
Wow

When you say "we have copied the complete AIX file system...as it is"

Please confirm you do not mean that you have copied /bin /sbin /etc /dev
 
Old 11-17-2016, 05:41 AM   #3
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,678

Rep: Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654
AIX was NOTHING like Linux until version 5L, and then really only if you added the open source extensions. IT is more similar now (if you ignore certain features, and all of the lpar extensions), but copying over a whole file system is -- unusual. Best of luck.

Your ftp setup may need some 'tweaking', but should basically work as before. Some of the ftp options will differ, and there are many more options. You have some reading to do, and trail and error testing and verification ahead. It should be fun.

If your traffic goes beyond your internal network, be aware that the rest of the world has moved on from ftp more than a decade ago, and sftp is preferred. (I aged myself, it is now more like two decades ago.) The protocol is more secure (all traffic is encrypted, including the initial authentication : ftp is in the clear and can be captured and compromised easily), but also the automation tools are far more powerful. Check into putty-tools (psftp and pscp), lftp, and OpenSSH (scp and sftp) for interesting detail.
 
Old 11-17-2016, 07:47 AM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 7,070

Rep: Reputation: Disabled
Yes .netrc works in Linux. What is Linux 7.2? The current stable version of Linux is 4.8.8.
 
Old 11-17-2016, 09:44 AM   #5
azheruddin
Member
 
Registered: Dec 2011
Posts: 91

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
@Disillusionist : No, we have copied all applciation file system which includes data files,shell scripts, application files with soft link and hard links.

@wpeckham seems FTP has not installed yet, will do it.
:/sbin> ftp
bash: ftp: command not found...

could you please confirm .netrc file if copy directly from AIX to work.



@Emerson its redhat linux version 7.2 , also could you please confirm if i place direct AIX- .netrc to Redhat linux host will it work.
 
Old 11-17-2016, 09:53 AM   #6
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 7,070

Rep: Reputation: Disabled
I'd recommend you compare man netrc for both systems. I do not expect there be any differences, but it is better to check. It is Red Hat Enterprise Linux (RHEL), Red Hat 7.2 was released in 2001 and is outdated, hope you are not using it?
 
Old 11-17-2016, 10:06 AM   #7
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 97
Depending on what you chose at install time, along with what utilities your various scripts require you may find yourself getting very familiar with "yum install ..."

Good luck with your project it looks interesting if likely to be frustrating at times

Last edited by Disillusionist; 11-17-2016 at 10:09 AM.
 
Old 11-17-2016, 09:20 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,847

Rep: Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584
Actually, RH 7.2 https://en.wikipedia.org/wiki/Red_Hat_Linux is indeed that old, but it is NOT the same as RHEL 7.2 https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux (note the 'E' there), which is the latest/greatest (paid-for) from Redhat .

As per previous comments, check the man pages etc for .netrc, but these days even on an (allegedly) secure internal network, you should be using either scp/sftp (part of the openssh pkg) or FTPS ie ftp+ssl - see vsftpd which is probably in the RHEL repos.

(4.8.8 is a kernel version & irrelevant here)

Last edited by chrism01; 11-17-2016 at 09:40 PM.
 
Old 11-18-2016, 05:58 AM   #9
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,678

Rep: Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654
Quote:
Originally Posted by chrism01 View Post
Actually, RH 7.2 https://en.wikipedia.org/wiki/Red_Hat_Linux is indeed that old, but it is NOT the same as RHEL 7.2 https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux (note the 'E' there), which is the latest/greatest (paid-for) from Redhat .

As per previous comments, check the man pages etc for .netrc, but these days even on an (allegedly) secure internal network, you should be using either scp/sftp (part of the openssh pkg) or FTPS ie ftp+ssl - see vsftpd which is probably in the RHEL repos.

(4.8.8 is a kernel version & irrelevant here)
Not irrelevant at all. While there are distributions with a number like 7.2 (Red Hat Enterprise Linux 7.2 for example) there is no product or package called 'linux 7.2' and we need to know what the OP really has and means to make directed answers based upon a specific distribution.

To the point: in all of the distributions I have encountered where FTP was still supported, the same basic ftp features applied. A few have security features that MAY be turned on that change that picture. There may be minor differences, but in general your answer should be "yes it works the same" if you turn off that security.
There are specific versions of some distributions that actively disable those features and detect and remove those files because the violate nearly every modern security standard. I manage about 200 servers based upon RHEL and CentOS, but none of them need or support the system you are using because our own security standards and ID software rejects it and OpenSSH offers better and more secure tools to accomplish the same goals. I do not believe the RHEL software rejects them, but I must admit I have not tested that since RHEL4 was pretty new.

I believe I and Emerson have already indicated that this should work, but I hope this makes things more clear.

Your best and most definitive answer will be the answer YOU provide after testing.
Please give it a try, and get back to use with the result.

(And the command should be "sudo yum install ftp" or as root "yum install ftp" to get ftp if you have a RHEL system. You may want to use more powerful and secure tools as previously mentioned.)
 
Old 11-23-2016, 10:33 PM   #10
azheruddin
Member
 
Registered: Dec 2011
Posts: 91

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
AIX- .netrc NOT working in linux

Hi,
I got an issue in .netrc , please find below SFTP script and .netrc file .
getting error as below, please assist me to rectify, thanks.

Quote:
sftp> $ imuploaddata test1.DAT /home/test/
Invalid command.


this is my FTP script

Code:
abc@systalk:~/test> cat imftp.sh
#!/bin/sh
filetoftp="$1"
filepath="$2"
echo "\$ imuploaddata $filetoftp $filepath" | sftp 10.251.21.157
my .netrc micro as below.

Code:
abc@systalk:~/test> cat ../.netrc

# machine MVS2.MAS.NET login TS19610 password ihsan31
machine s_kulsznas1.kulsz.usr.mas.net login kulsz/\graflite password grafl1te
machine 10.251.21.157 login sysftp password imsw19tp
macdef imupload1
        cd /PROJECT_D/01_source_layer/01_raw_source_files/CPD
        lcd $2
        prompt off
        ascii
        verbose on
        put $1
        quit

macdef imuploaddata
        cd /PROJECT_B/01_source_layer/01_raw_source_files/CPD
        lcd $2
        prompt off
        ascii
        verbose on
        put $1
        quit
 
Old 11-24-2016, 10:36 AM   #11
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,678

Rep: Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654Reputation: 1654
Ok, there is a bit of a misunderstanding here. Anything that ftp can do with the .netrc file sftp can do, but it works a different way. Normally sftp does NOT use the .netrc file, and it is considered insecure. I recommend reading the man pages for sftp and ssh. Look for detail on the config file that goes in the .ssh folder under your account home. You may also want to read up on ssh-keygen and ssh-copy-id. Using keys is more secure than using passwords, and makes automated logon easy as long as you attend to the file and folder permissions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] AIX to Linux Migration nishanthp82 Linux - Newbie 1 11-15-2011 09:16 AM
Aix - Linux Scripts Migration Issues kumarancs Linux - Newbie 4 09-07-2011 11:50 AM
Migration of script from Aix to Linux smk.muthu Linux - Newbie 3 08-31-2011 07:15 PM
Step by Step Migration Process of AIX to RedHat & Hp-UX to RedHat austinbravo Linux - Newbie 5 06-07-2010 05:26 PM
AIX to Linux Migration damine Red Hat 0 01-06-2005 09:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration