Solved

can't ftp and telnet in Redhat7.2

Posted on 2002-03-19
15
695 Views
Last Modified: 2013-12-06
After logon as root, I try to ftp and telnet to the localhost in Konsole. Here's the error message, would you pls help?


# ftp localhost
Connected to localhost.localdomain.
220 xxx FTP server (Version wu-2.6.1-18) ready.
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhost:root): anders
331 Password required for anders.
Password:
530 Login incorrect.
Login failed.
ftp>

# telnet localhost
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Red Hat Linux release 7.2 beta with CLE (Gaga)
Kernel 2.4.12-0.1 on an i686
login: anders
Password:

System error
Connection closed by foreign host.

Many thanks!
Anders.
0
Comment
Question by:andersy
  • 6
  • 6
  • 2
  • +1
15 Comments
 
LVL 1

Expert Comment

by:Sixpax
ID: 6881008
Please answer the following questions:

1) does ftp and telnet work as root instead of anders?
2) what does the entry in /etc/passwd look like for "anders"?
3) what are the contents of /etc/shells?
4) what are the contents of /etc/hosts.allow?
5) what are the contents of /etc/hosts.deny?
6) if you are running inetd, what does the ftp and telnet entries look like in /etc/inetd.conf?
7) if you are running xinetd, what are the contents of /etc/xinetd.d/telnet and /etc/xinetd.d/wu-ftpd?
8) what happens when you run "su - anders" as root?
0
 
LVL 4

Expert Comment

by:MFCRich
ID: 6881489
Your FTP stuff appears as though you entered the wrong password for 'anders' or that user doesn't exist.

On most distros root cannot log-on to telnet or ftp for security reasons. If you need root access through telnet you should telnet in as a normal user and then 'su' to root.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 6881640
This system sure doesn't look like RedHat 7.2 to me. Neither the 7.2 distribution nor the updates provide kernel-2.4.12-0.1. And that might be a cause of the failures being seen.

However, it looks somewhat like the system might be configured for other than normall password/shadow file authentication. The wu-ftp server doesn't normally toss an Kerberos error message and seeing that messages makes me think that it might be Kerberos that is failing or isn't compatible with the FTP and telnet server.
0
 

Author Comment

by:andersy
ID: 6882887
Hello Sixpax,

1. still won't work for root
2. anders:x:500:500:anders:/home/anders:/bin/bash
3. /bin/sh
   /bin/bash
   /bin/bash2
   /bin/ash
   /bin/bsh
   /bin/tcsh
   /bin/csh
   /bin/ksh
   /bin/zsh
4 and 5. no content
6. using xinetd
7. telnet:
   service telnet
   {
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/sbin/in.telnetd
        log_on_failure  += USERID
        disable         = no
   }
   wu-ftpd:
   service ftp
   {
        socket_type             = stream
        wait                    = no
        user                    = root
        server                  = /usr/sbin/in.ftpd
        server_args             = -l -a
        log_on_success          += DURATION USERID
        log_on_failure          += USERID
        nice                    = 10
        disable                 = no
   }
8. I can su to anders.


Hello MFCRich,

You may be right as I can't login anders in login prompt. Even I change the passwd in User Manager, I still cannot login. Do you know why?


Hello jlevie,

My version is "Red Hat Linux release 7.2 beta with CLE (Gaga)", where CLE is Chinese Language Extension. If it's the problem of Kerberos, do you know how to fix?


FYI: When I try to login FTP using anonymous, it works. I think it should be the problem of authentication. Do you guys have any hints?

Many thanks.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 6882977
Is the system configured to use Kerberos Authentication?
0
 

Author Comment

by:andersy
ID: 6884429
Hello jlevie,

Can you tell me how to check if the system is using Kerberos Authentication?
0
 
LVL 1

Expert Comment

by:Sixpax
ID: 6885695
I know this doesn't answer the problem with your user login, but to allow root to login through telnet or ftp you need to remove/rename the /etc/securetty file.  By default, root is not allowed to login to the machine from a remote connection.

What messages do you get when you try to login as "anders" from a login (console) prompt?
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 40

Expert Comment

by:jlevie
ID: 6887434
Check /etc/sysconfig/authconfig. If Kerberos is being used there'll be a line containing 'USEKERBEROS==yes' and somewhere you'd have a Kerberos server that all systems would be configured to use.
0
 

Author Comment

by:andersy
ID: 6896410
USEKERBEROS = no

Do you have any other suggestions?
0
 
LVL 40

Expert Comment

by:jlevie
ID: 6899222
Can the anders user log on the the console?

Also can I see the contents of /etc/sysconfig/authconfig?
0
 

Author Comment

by:andersy
ID: 6902550
Hello jlevie,

I can't login as anders, even I've changed the password. I can only login using root.

Here's the content:

# cat authconfig
USEHESIOD=no
USELDAP=yes
USEMD5=yes
USENIS=no
USEKERBEROS=no
USELDAPAUTH=yes
USESHADOW=yes
USESMBAUTH=no

Pls help!
0
 
LVL 40

Expert Comment

by:jlevie
ID: 6902702
Okay, according to what's above your system has been configured to use LDAP for user names and authentication. Is that what you intended and do you have an LDAP server that's configured to provide Linux compatible authentication?

Since you say that you've changed the password for anders, my guess if that you've done it on the Linux system. But, since the system has been told to use LDAP that has no affect.

To change the authentication method you'll want to log in on a console, not the GUI, and execute /sbin/authconfig. Uncheck LDAP and leave "Cache Information", "Use NIS" and "Use Hesiod" un-selected on the first screen. On the second screen only "Use Shadow Passwords" and "Use MD5 Passwords" should be selected. Reboot when done and you should be configured for conventional authentication.
0
 

Author Comment

by:andersy
ID: 6903236
Oops... I can't login as root in Console! I can only login as root in graphic mode.

Can I directly modify /etc/sysconf/authconfig by setting
 USELDAP=no ?

BTW, I can't find the file /sbin/authconf.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 100 total points
ID: 6903318
Sorry, it's /usr/sbin/authconfig... My bad...

I'm guessing that the system is configured for a GUI login and that's why you are having trouble with root's login.

There's a way to get to a console, even with the GUI login enabled. Alt-Ctrl-F2 will take you to another virtual console (and Alt-Ctrl-F7 will take you back to the GUI). You can run authconfig in a terminal window from root's login, but the terminal type isn't right and the display is a bit messed up. You can still use the tool that way but it's harder to figure out what you are doing.
0
 

Author Comment

by:andersy
ID: 6907063
I can login as anders and perform ftp and telnet.
Many thanks!
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now