[转]busybox中telnet 功能添加
使用busybox制作的一个基本根文件系统如何添加telnetd服务呢?
下面把本人的添加过程列出来供大家分享,如有不同意见请不吝赐教!
1、 添加telnet的支持(busybox中配置)
Networking Utilities --->
[*] telnet
[*] Pass TERM type to remote host
[*] Pass USER type to remote host
[*] telnetd
[*] Support standalone telnetd (not inetd only)
2、 添加mdev的支持(busybox中配置)
Linux System Utilities --->
[*] mdev
3、 添加login(busybox中配置)
Login/Password Management Utilities --->
[*] login
4、 修改etc/init.d/rcS添加mdev内容
#!/bin/sh
mount -a
mkdir /dev/pts
mount -t devpts devpts /dev/pts
echo /sbin/mdev>/proc/sys/kernel/hotplug
mdev -s
/bin/hostname -F /etc/hostname
5、 创建etc/hostnam,并添加主机名
farsight
6、 在etc下创建文件passwd,group,shadow,创建目录/home
7、 修改etc/fstab为
#device mount-point type options dump fsck order
proc /proc proc defaults 0 0
tmpfs /tmp tmpfs defaults 0 0
sysfs /sys sysfs defaults 0 0
tmpfs /dev tmpfs defaults 0 0
8、 内核中添加相应的支持
UNIX98_PTYS=y
DEVPTS_FS=y
9、 使用adduser添加用户
#adduser linux
10、 添加命令行提示符格式,修改/etc/profile添加如下内容
PS1='[\u@\h \W]\# '
HOSTNAME=`/bin/hostname`
export USER LOGNAME PS1
11、 启动telnet服务,在/etc/profile下添加如下内容
telnetd
这个时候我们就可以同过telnet client登陆我们的板子了。上面这些步骤有些不是必须的,大家可以根据需求选择。
12、 参考文献
A daemon for the TELNET protocol, allowing you to log onto the host running the daemon. Please keep in mind that the TELNET protocol sends passwords in plain text. If you can't afford the space for an SSH daemon and you trust your network, you may say 'y' here. As a more secure alternative, you should seriously consider installing the very small Dropbear SSH daemon instead:
http://matt.ucc.asn.au/dropbear/dropbear.html
Note that for busybox telnetd to work you need several things:
First of all, your kernel needs:
UNIX98_PTYS=y
DEVPTS_FS=y
Next, you need a /dev/pts directory on your root filesystem:
$ ls -ld /dev/pts
drwxr-xr-x 2 root root 0 Sep 23 13:21 /dev/pts/
Next you need the pseudo terminal master multiplexer /dev/ptmx:
$ ls -la /dev/ptmx
crw-rw-rw- 1 root tty 5, 2 Sep 23 13:55 /dev/ptmx
Any /dev/ttyp[0-9]* files you may have can be removed.
Next, you need to mount the devpts filesystem on /dev/pts using:
mount -t devpts devpts /dev/pts
You need to be sure that Busybox has LOGIN and FEATURE_SUID enabled. And finally, you should make certain that Busybox has been installed setuid root:
chown root.root /bin/busybox
chmod 4755 /bin/busybox with all that done, telnetd _should_ work....
http://blog.donews.com/tmsonhust/archive/2009/03/14/1477052.aspx
[转]busybox中telnet 功能添加的更多相关文章
- ASP.NET 给Web中的网页添加Loading进度条形式
前段时间客户提了一个需求,要求给网站中某些功能添加进度条形式,因为某些功能查询的数据量太大,经常会出现点击Search按钮,但是没有任何反应的情况,会让用户以为网站挂掉了,导致投诉的事情发生,所以客户 ...
- HTTP学习实验8-windows添加telnet功能
Windows 添加telnet功能: 控制面板->(查看方式:小图标)->程序和功能->打开或关闭Windows功能->Telnet客户端 Telnet 设置: 打开cmd, ...
- windows10操作系统中cmd窗口下telnet功能失效的解决方案
查找windows自带功能,在window10中相当方便.打开windows10的设置面板,在搜索栏中搜索“windows功能”,弹出以下界面: 根据弹出的提示“启动或停用windows功能”即可弹出 ...
- [Swift通天遁地]五、高级扩展-(12)扩展故事板中的元件添加本地化功能
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...
- MVC5 网站开发之八 栏目功能 添加、修改和删除
本次实现栏目的浏览.添加.修改和删除. 栏目一共有三种类型. 常规栏目-可以添加子栏目,也可以添加内容模型.当不选择内容模型时,不能添加内容. 单页栏目-栏目只有一个页面,可以设置视图. 链接栏目-栏 ...
- iOS开发小技巧 - label中的文字添加点击事件
Label中的文字添加点击事件 GitHub地址:https://github.com/lyb5834/YBAttributeTextTapAction 以前老师讲过类似的功能,自己懒得回头看了,找了 ...
- Qt调用dll中的功能函数
声明: 事先我已经自己动手写了一个简单的dll文件(myDLL.dll),C版接口的.并且用我前两篇有关DLL文章里面的方法,从dll中导出了导入库(.lib)文件,dll中有两个函数,原型如下: ...
- oracle数据库不支持mysql中limit功能
oracle数据库不支持mysql中limit功能,但可以通过rownum来限制返回的结果集的行数,rownum并不是用户添加的字段,而是oracle系统自动添加的. (1)使查询结果最多返回前10行 ...
- iOS中通知的添加和移除
我们都知道viewWillAppear:方法是在控制器的view将要显示的时候调用的,而viewWillDisappear:方法是在控制器的view将要隐藏的时候调用.很多时候我们根据自身需要将相关代 ...
随机推荐
- Java反射+注解案例
注解类代码,注解的属性可以有多个: package reflect; import java.lang.annotation.Retention; import java.lang.annotatio ...
- MySQL - Linux下安装
本安装方式仅对5.7.21版本负责. 下载地址:wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.21-linux-glibc2 ...
- python--Matplotlib(二)
Matplotlib+pandas作图 一.对csv文件进行提取ruixi.csv 对上述表格进行提取并做图 #-*- coding:utf-8 -*- import matplotlib as mp ...
- python3 练习题100例 (十七)四位车号问题
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'Fan Lijun' import math for i in range(1 ...
- Open source cryptocurrency exchange
Peatio: https://github.com/peatio/peatio ViaBTC: https://github.com/viabtc/viabtc_exchange_server
- python——直方图均衡化
from PIL import Image from pylab import * from numpy import * def histeq(im,nbr_bins = 256): "& ...
- 17-比赛1 F - 较小元素 Weak in the Middle (set)
Seg-El has last chance to make the final changes in order to prevent the destruction of Krypton. He ...
- Apache服务配置
Apache 1.安装Apache服务 第1步:把光盘设备中的系统镜像挂载到/media/cdrom目录. [root@zhangjh ~]# mkdir -p /media/cdrom/ [root ...
- PHP.28-TP框架商城应用实例-后台5-多表操作-商品表与品牌表
表与表之间的关系:1:1 1:多 多:多 功能需求决定表关系 此处的表关系为:品牌表:商品表=1:多 1.首先在表结构上关联,在多的表(商品表)添加一个字段,关联一的表(品牌表)的ID(主键) 添加字 ...
- ST-LINK JLINK JTAG SWD接线图