When we try connected to HPUX server with FTP client with another user except root, sometimes we got a small problem with that.
But don't be afraid, we got some workaround here.
Ok now let's start the trial
1. First we try to connect to HPUX server with FTP from any client, with user "oracle".
bash> ftp rohan Connected to rohan. 220 rohan FTP server (Revision 3.0 Version wuftpd-2.6.1 Wed Dec 19 08:27:34 GMT2007) ready. User (rohan:(none)): oracle 331 Password required for oracle. Password: ***** 530 Login incorrect. Login failed. ftp> bye 221 Goodbye.
2. Logging all connection
Back to HPUX, now we try to log all connection, including ftp.
sh> inetd -l
Check if the log was run properly
sh> tail -f /var/adm/syslog/syslog.log Sep 2 08:35:51 rohan ftpd[22988]: FTP server (Revision 3.0 Version wuftpd-2.6.1 Wed Dec 19 08:27:34 GMT 2007) ready. Sep 2 08:35:54 rohan ftpd[22988]: FTP LOGIN REFUSED (shell not in /etc/shells) FROM 10.14.14.12 [10.14.14.12], oracle
As you can see, inetd logging was run properly. But wait, see end of line of log, yes!! that the answer for that mysterious small problem on ftp connection.
3. Add user shell on listing system shell
Like i said before, in the line of log on syslog file, that's the answer for this problem. Ok. Now we do like syslog said.
sh> grep oracle /etc/passwd oracle:RHMbMFlgIVmB.:109:106::/home/oracle:/bin/bash
mmm, oracle used "bash" on default shell, on HPUX "bash" was not default install, ok next, we add that "bash" shell at default listing shell on HPUX.
sh> echo '/bin/bash' >> /etc/shells
4. Gotcha!!
All set. now we try to ftp again from client to HPUX server, with oracle user.
dos> ftp rohan Connected to rohan. 220 rohan FTP server (Revision 3.0 Version wuftpd-2.6.1 Wed Dec 19 08:27:34 GMT2007) ready. User (rohan:(none)): oracle 331 Password required for oracle. Password:***** 230 User oracle logged in. ftp> ls 200 PORT command successful. 150 Opening ASCII mode data connection for file list. .cshrc .exrc .login .profile .sh_history stage .bash_history 226 Transfer complete. ftp: 68 bytes received in 0.00Seconds 68000.00Kbytes/sec. ftp> by 221-You have transferred 0 bytes in 0 files. 221-Total traffic for this session was 367 bytes in 1 transfers. 221-Thank you for using the FTP service on rohan. 221 Goodbye.
it's work, easy like a pie, don't forget to check syslog.
sh> tail -f /var/adm/syslog/syslog.log Sep 2 08:43:23 rohan ftpd[23227]: Data port : 20 Sep 2 08:43:23 rohan ftpd[23227]: FTP server (Revision 3.0 Version wuftpd-2.6.1 Wed Dec 19 08:27:34 GMT 2007) ready. Sep 2 08:43:27 rohan ftpd[23227]: FTP LOGIN FROM 10.10.14.172 [10.10.14.172], oracle Sep 2 08:43:31 rohan ftpd[23227]: FTP session closed
Tulisan lama ini dibuat kembali, untuk teman yang baru training HP-UX 11.31 di singapur.
Gimana man masih blum bisa juga, nih gue kasih solvingnya,
hahahaha..