找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3864|回复: 1

cl root 密码忘了怎么 解决????

[复制链接]
发表于 2005-12-7 18:06:32 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
cl root  密码忘了怎么 解决???? 除了重装
routeros
发表于 2005-12-9 11:55:43 | 显示全部楼层
可以的,不过你需要写一个脚本或者用linux版本的制作盘带的 rmpassword.sh。我不知道较新版本 里是否包含这个工具。复制到磁盘,启动,执行~,还有就是别忘记给这个教本设置权限 755 就是了。还有就是webadmin的密码也需要处理的。
我上传了一个ZIP压缩的脚本,其余的自己处理吧~
我曾经做过一个单独的插件,后来因为资料损坏,丢失了很多东西~。你也可以自己做一个,很简单的。
#!/bin/sh
#
# This utility removes the root password from an existing Coyote
# Linux floppy.

clear
echo "Coyote Linux root password removal utility 1.0.0"
echo
echo "To remove the root password from your Coyote Linux boot floppy, place"
echo "it in the floppy drive and press enter to continue (or press CTRL-C to"
echo "abort this script)."
read JUNK

mount /dev/fd0 mnt -t msdos
if ! [ $? = 0 ]; then
        echo "Failed to mount floppy."
        exit 1
fi

if [ -r mnt/etc.lrp ]; then
        ETCFILE=etc.lrp
elif [ -r mnt/etc.tgz ]; then
        ETCFILE=etc.tgz
else
        echo 'Unable to find "etc" package on floppy disk.'
        umount mnt
        exit 1
fi

mkdir pkgtmp
cp mnt/${ETCFILE} pkgtmp
cd pkgtmp
tar -xzf $ETCFILE

if ! [ -r etc/shadow ]; then
        echo "Unable to locate password database file."
        cd ..
        rm -Rf pkgtmp
        umount mnt
        exit 1
fi

# If telnet access it enabled, disable it
[ -r etc/remote.allow ] && rm -f etc/remote.allow

cp -f ../shadow.tmp etc/shadow
chmod 600 etc/shadow

rm -f ../${ETCFILE}
tar -czf ../${ETCFILE} .

cd ..
cp -f $ETCFILE mnt/
rm -Rf pkgtmp
rm $ETCFILE
umount mnt
sync

echo "Password removal complete."
echo

rmpassword.zip

666 Bytes, 下载次数: 63, 下载积分: 铜板 -1

routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-10-3 17:27 , Processed in 0.066233 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表