ЗАО «ЗЭО»
Техническая поддержка пользователей => Тион-Про28, Орион28 => Тема начата: lman от 11 Июня, 2013, 08:46:54
-
переформировал фаловую систему, и переконфигурировал ядро.
Тион28 работает нормально, однако telnet-сервер теперь не стартует.
В конфиге "/etc/inetd.conf" стоит старт telnetd (файл тоже есть такой в "/usr/sbin"), однако в запущенных процессах telnetd отсутствует (проверял командой "ps axjf").
в чем может быть проблема?
-
Если он в /etc/inetd.conf, то процесса не будет до подключения.
-
а при подключении со стороннего ПК выдается такая штука:
Trying 192.168.0.23...
Connected to 192.168.0.23.
Escape character is '^]'.
telnetd: invalid option -- 'i'
telnetd: unknown command line option: ?
Connection closed by foreign host.
говорящая о том, что telnet сервер не запущен на Тионе.
-
> говорящая о том, что telnet сервер не запущен на Тионе.
Запущен, но с непонятными ему параметрами.
1. telnetd из busybox?
2. Какая строка для telnetd в /etc/inetd.conf?
-
Строка в inetd.conf вот такая вот:
"telnet stream tcp nowait root /usr/sbin/telnetd telnetd -i"
-
Замените "-i" на "-l /bin/sh"
-
Заменил, теперь пишет вот такое:
Trying 192.168.0.23...
Connected to 192.168.0.23.
Escape character is '^]'.
telnetd: junk arguments in the command line
Connection closed by foreign host.
-
> telnetd: junk arguments in the command line
Может быть dos-разделение строки, пишите аккуратнее.
-
да нет там никакого dos-разделения, этот файл был отредактирован в vi прямо на Тионе.
дело здесь в чем-то другом явно.
-
вот полный текст моего файла inetd.conf:
root@freescale ~$ cat /etc/inetd.conf
# seh: from netkit-base-0.17 but with shell enable for auto-test
# See "man 8 inetd" for more information.
#
# If you make changes to this file, either reboot your machine or send the
# inetd a HUP signal:
# Do a "ps x" as root and look up the pid of inetd. Then do a
# "kill -HUP <pid of inetd>".
# The inetd will re-read this file whenever it gets that signal.
#
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
#
# It is generally considered safer to keep these off.
#echo stream tcp nowait root internal
#echo dgram udp wait root internal
#discard stream tcp nowait root internal
#discard dgram udp wait root internal
#daytime stream tcp nowait root internal
#daytime dgram udp wait root internal
#chargen stream tcp nowait root internal
#chargen dgram udp wait root internal
#time stream tcp nowait root internal
#time dgram udp wait root internal
#
# These are standard services.
#
ftp stream tcp nowait root /usr/sbin/ftpd ftpd
telnet stream tcp nowait root /usr/sbin/telnetd telnetd -l /bin/sh
# nntp stream tcp nowait root tcpd in.nntpd
# smtp stream tcp nowait root tcpd sendmail -v
#
# Shell, login, exec and talk are BSD protocols.
#
# If you run an ntalk daemon (such as netkit-ntalk) on the old talk
# port, that is, "talk" as opposed to "ntalk", it won't work and may
# cause certain broken talk clients to malfunction.
#
# The talkd from netkit-ntalk 0.12 and higher, however, can speak the
# old talk protocol and can be used safely.
#
shell stream tcp nowait root /usr/sbin/rshd rshd
login stream tcp nowait root /usr/sbin/rlogind rlogind -o
#exec stream tcp nowait root /usr/sbin/rexecd rexecd
# talk dgram udp wait root /usr/sbin/talkd talkd
ntalk dgram udp wait root /usr/sbin/talkd talkd
#
# Kerberos authenticated services
#
# klogin stream tcp nowait root /usr/sbin/rlogind rlogind -k
# eklogin stream tcp nowait root /usr/sbin/rlogind rlogind -k -x
# kshell stream tcp nowait root /usr/sbin/rshd rshd -k
#
# Services run ONLY on the Kerberos server
#
# krbupdate stream tcp nowait root /usr/sbin/registerd registerd
# kpasswd stream tcp nowait root /usr/sbin/kpasswdd kpasswdd
#
# Pop et al
# Leave these off unless you're using them.
#
#pop2 stream tcp nowait root /usr/sbin/tcpd in.pop2d
#pop3 stream tcp nowait root /usr/sbin/tcpd in.pop3d
#
# Comsat - asynchronous new mail notification. Recommended to leave it off.
#
# comsat dgram udp wait root /usr/sbin/tcpd in.comsat
#
# The Internet UUCP service.
#
# uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico -l
#
# Tftp service is provided primarily for booting. Most sites
# run this only on machines acting as "boot servers." If you don't
# need it, don't use it.
#
# tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd
# bootps dgram udp wait root /usr/sbin/in.bootpd in.bootpd
#
# Finger, systat and netstat give out user information which may be
# valuable to potential "system crackers." Many sites choose to disable
# some or all of these services to improve security.
#
finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd -w
#systat stream tcp nowait nobody /usr/sbin/tcpd /bin/ps -auwwx
#netstat stream tcp nowait root /usr/sbin/tcpd /bin/netstat -a
ident stream tcp nowait root /usr/sbin/in.identd in.identd
#
# Sun-RPC based services.
# <service name/version><sock_type><rpc/prot><flags><user><server><args>
#
# rstatd/1-3 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rstatd
# rusersd/2-3 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rusersd
# walld/1 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rwalld
# End.
-
Уберите пустую строку ниже.
-
уже убирал и добавлял, результат один и тотже:
Trying 192.168.0.23...
Connected to 192.168.0.23.
Escape character is '^]'.
telnetd: junk arguments in the command line
Connection closed by foreign host.
-
может еще чего не запущено, поэтому и telnetd не пашет?
-
inetd при этом перезапускали?
P.S. У меня работает.
-
не только перезапускал, но и еще делал холодный рестарт Тиона с выдергиванием питания.
Не помогает.
-
Вообще у меня работает даже и с "-i" и без сообщений, и с вашим inetd.conf
"root filesystem built on Tue, 11 Sep 2012 13:27:12 +0400"
-
> 1. telnetd из busybox?
Какой вывод ls -l /usr/sbin/telnetd
и вывод busybox
-
root@freescale /media/ext_flash$ ls -l /usr/sbkn/telnetd
-rwxr-xr-x 1 messageb messageb 59017 Jan 1 1970 /usr/sbin/telnetd
root@freescale /bin$ ls -l /bin/busybox
-rwxrwxrwx 1 messageb messageb 560104 Jun 9 18:13 /bin/busybox
-
У вас telnetd не из Busybox, у меня из Busybox.
Посмотрите вывод busybox, есть ли там telnetd. Если есть, переименуйте текущий
файл /usr/sbin/telnetd и создайте ссылку /usr/sbin/telnetd на busybox (где он там
находится).
-
Да, так и вышло, что запускаемый у меня telnetd был скомпилен вместе с файловой системой и ядром.
я сделал так:
1. зашел в каталог /usr/sbin и переименовал мой telnetd в telnetd_old (команда "mv telnetd telnetd_old");
2. затем создал символическую ссылку на busybox, содержащий в себе свой собственный telnetd (находясь в "/usr/sbin" выполнил "ls -s ../../bin/busybox telnetd");
3. зашел в корневой каталог "/bin" и при помощи vi открыл файл "inetd.conf" ("vi inetd.conf");
4. исправил строчку, содержащую telnet на "telnet stream tcp nowait root /usr/sbin/telnetd telnetd -i";
5. вышел из vi и из командной строки вызвал "reboot"
После этого всё заработало!