b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

树莓派更改root密码

电脑杂谈  发布时间:2019-05-30 18:22:22  来源:网络整理

树莓派 默认密码_树莓派_树莓派默认账号密码

树莓派更改root密码

1、树莓派的Centos7系统默认用户名:root,默认密码:centos

2、如果已登录修改密码很简单,直接输入指令passwd就能修改。

树莓派_树莓派 默认密码_树莓派默认账号密码

3、我一直用的树莓派默认密码,把树莓派当成一个小服务器使用,暴露在外网后明显受到了攻击树莓派 默认密码。虽然我的IP的运营商分配的动态IP,但是就在前天,我的树莓派还是被不知道哪儿来的黑客攻破了。他第一时间改了我的登录密码,然后我就无法登陆了,是的!无法登陆了!我看了他在我树莓派上留下的痕迹,当然他的ip无法追踪,都是国外的代理IP,它还下载了一些文件,最后还删除了,可能看我的树莓派配置太渣。

树莓派更改root密码

步入正题,在这种未知密码的情况下如何修改root的密码。网上很多修改方法都是有grub引导。树莓派的Centos系统没有树莓派 默认密码

树莓派默认账号密码_树莓派 默认密码_树莓派

A、将树莓派的SD卡拔下,通过读卡器连接到电脑

B、找到SD卡里面的cmdline.txt文件

C、修改cmdline.txt内容,在文末添加init=/bin/sh

树莓派默认账号密码_树莓派_树莓派 默认密码

修改前:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p3 rootfstype=ext4 elevator=deadline rootwait selinux=1 security=selinux enforcing=0

修改后:

树莓派_树莓派默认账号密码_树莓派 默认密码

dwc_otg.lpm_enable=0 console=tty1 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait。dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait。the mls_level environment variable provides support for multiple per-job selinux security contexts in the same crontab. by default, cron jobs execute with the default selinux security context of the user that created the crontab file. when using multiple security levels and roles, this may not be sufficient, because the same user may be running in a different role or at a different security level. you can set mls_level to the selinux security context string specifying the selinux security context in which you want the job to run, and crond will set the execution context of the or jobs to which the setting applies to the specified context. see the description of crontab -s in the options section.。

D、将SD卡插入树莓派,并重新启动,启动后会卡在一个地方很长时间,

E、此时输入指令:mout -o remount, rw /

F、如果有报错,就再次输入E步骤指令;如果没报错,此时便可更改root密码,输入指令:passwd root 回车后再输入两次新密码,即可修改密码

G、拔出SD卡插到电脑,将cmdline.txt文件恢复原状,即删除init=/bin/sh,

H、重启树莓派,即可用新密码登录


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/bofangqi/article-102481-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      热点图片
      拼命载入中...