免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1538 | 回复: 4
打印 上一主题 下一主题

求助:进入嵌入式系统出现$ [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-09-19 15:38 |只看该作者 |倒序浏览
busybox1.13做的文件系统,希望用root用户进嵌入式系统的,结果是$用户
文件linuxrc:
#!/bin/sh
echo "mount /etc as ramfs"
/bin/mount -n -t ramfs ramfs /etc
/bin/cp -a /mnt/etc/* /etc
                                                                                
echo "re-creat the /etc/mtab entries"
/bin/mount -f -t cramfs -o remount,ro /dev/mtdblock/2/

echo "........mount /proc as proc"
/bin/mount -n -t proc none /proc
                                                                                
echo "mount /sys as sysfs"
/bin/mount -n -t sysfs none /sys
                                                                                
exec /sbin/init

文件inintab
::sysinit:/etc/init.d/rcS
                                                                                
# /bin/sh
#
# Start an "askfirst" shell on the console (whatever that may be)
::askfirst:-/bin/sh
                                                                                
# Stuff to do when restarting the init process
::restart:/sbin/init
                                                                                
# Stuff to do before rebooting
::ctrlaltdel:/sbin/reboot
::shutdown:/bin/umount -a -r
::shutdown:/sbin/swapoff -a

文件passwd
root:0:0:root:/root:/bin/bash
文件group
root:0:root

无shadow文件。希望root无密码登陆

[ 本帖最后由 feihu02 于 2008-9-19 15:45 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-09-19 16:19 |只看该作者
把表情去掉吧..

论坛徽章:
0
3 [报告]
发表于 2008-09-19 16:24 |只看该作者

回复 #2 eveson 的帖子

文件passwd
root: x:0:0:root:/root:/bin/bash
文件group
root: x:0:root

[ 本帖最后由 feihu02 于 2008-9-19 16:27 编辑 ]

论坛徽章:
0
4 [报告]
发表于 2008-09-20 11:36 |只看该作者
文件passwd
root::0:0:root:/root:/bin/sh
文件group
root:*:0:root,operator

论坛徽章:
0
5 [报告]
发表于 2008-09-22 12:55 |只看该作者

回复 #4 fansfu 的帖子

把passwd  group干掉!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP