[转]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 动态生成SQL
代码如下: /** * 动态生成SQ及SQL参数L * @param ve 接收到的消息的CHGLIST * @param paramList MQ消息中的SQL参数 * @param t 泛型对象 ...
- layer 点击弹出图片
今天做东西有一个功能:在列表点击图片弹出并放大显示,使用到了layer的页面层,下边是个小demo success:function (e) { var url = e.qrcode_url; //a ...
- list推导式,dict推导式,set推导式
生成一个1-14的列表 1.1 普通for循环 # lst = [] # for i in range(1,15): # lst.append(i) # print(lst) # # 结果: # [1 ...
- Python代码结构——顺序、分支、循环
## 顺序结构 - 按照从上到下的顺序,一条语句一条语句的执行,是最基本的结构 ## 分支结构 if condition: statement statement ... elif condition ...
- QWidget 自带的最大化,最小化,关闭按键的设置
使用函数 setWindowFlags 参数: CustomizeWindowHint 去掉窗口所有自带按钮 Qt::CustomizeWindowHint | Qt::WindowCloseButt ...
- 裸机——I2C 2
前面的随笔完成了I2C时序分析(不涉及仲裁) 现在可以学使用控制器的I2C了. 1.先回顾I2C的基础知识 (1)总线包括SCL + SDA. (2)通信的特点: 同步,串行,电平 所以决定了 I2C ...
- P2567 [SCOI2010]幸运数字 DFS+容斥定理
P2567 [SCOI2010]幸运数字 题目描述 在中国,很多人都把6和8视为是幸运数字!lxhgww也这样认为,于是他定义自己的“幸运号码”是十进制表示中只包含数字6和8的那些号码,比如68,66 ...
- 删除警告的方法 python
import warningswarnings.filterwarnings('ignore')
- [CodeForces948C]Producing Snow(优先队列)
Description 题目链接 Solution 将温度做一个前缀和,用一个优先队列依次处理一遍 思路还是很简单的 Code #include <cstdio> #include < ...
- 使用Windows Live Writer写文章时不要用360清除垃圾
ref:http://www.zhengsiwei.com/write-an-article-to-use-windows-live-writer-dont-use-360-to-remove-rub ...