linux 运行级别:
在RedHat系统启动时,按向上或向下箭头进入GRUB编辑界面,按"e"做如下(红字)修改:
"e" to edit the commands before booting. 修改: kernel /boot/vmlinux-2.6.18-8.e15 ro root=LABEL=/ rhgb quiet 为: kernel /boot/vmlinux-2.6.18-8.e15 ro root=LABEL=/ rhgb quiet 1
然后按"b"键 运行系统
或者在RedHat系统启动时,按向上或向下箭头进入GRUB编辑界面,按"a"做如下(红字)修改:
"a" to modify the kernel arguments 修改: grub append> ro root=LABEL=/ rhgb quiet 为: grub append> ro root=LABEL=/ rhgb single quiet
确认后进入单用户模式下.修改ROOT密码.
重启系统后就能以新root密码进入正常模式. ps:
在使用linux时,可能会碰到root密码忘记的情况,这时我们可以通过如下操作来重设root密码,这种操作只能在本地机上来进行,那些想试图通过网络来修改的就不要有非分之想了。
在服务器开机运行到Grub画面是,按E键进入登陆选择项,其中有三项:
------------------------------------------------- root(hd0,0) kernel /boot/vmlinuz-2.4.21-15 EL ro root=LABEL=/ initrd /initrd-2.4.21-15 EL.img ------------------------------------------------- 将光标移到第二项,然后再次按E键,在出现的界面里面最下面一行是: Grub edit > kernel /boot/vmlinuz-2.4.21-15.EL ro root=LABEL=/ 在ro之前添加 single ,或者在这行后加一个空格再输入1,这两个操作任何一个都可以即: Grub edit > kernel /boot/vmlinuz-2.4.21-15.EL single ro root=LABEL=/ 或者 Grub edit > kernel /boot/vmlinuz-2.4.21-15.EL ro root=LABEL=/ 1 然后按回车返回刚才的Grub登陆选择界面,在第二项上按B键。即可直接进入Linux命令行,然后键入 passwd root 即可修改root用户的密码。再reboot重新启动计算机就可以了。 (一)Linux 系统密码破解 |
linux下创建用户和修改用户密码
第一步:用root用户登录,创建用户名为test的用户(此时该用户并不能登录,因为还没为该用户创建密码) [root@red /]# useradd test 第二步:为用户test创建密码,密码为test [root@red /]# passwd test Changing password for user test. New UNIX password: test BAD PASSWORD: it is too short Retype new UNIX password: test passwd: all authentication tokens updated successfully.
转载自:http://xgli0910.blog.163.com/blog/static/46962168201271810231566/