solaris 10 root忘记密码的解决方法

摘要:
我的root本来是没有密码的。在控制台用root登陆了,执行了sys-unconfig,重新配置了一下系统信息。(sys-unconfig会清除所有的设置信息,包括root密码,奇怪的是却不会删除其它用户的密码。想哭~查看soliaris的文档817–1985–15 SystemAdministrationGuide:BasicAdministration的ManagingUserAccountsandGroups部分,里面有说明:Passwordinformationisstoredasfollows:·InthepasswdfilewhenyouareusingNISorNIS+·Inthe/etc/shadowfilewhenyouareusing/etcfiles·InthepeoplecontainerwhenyouareusingLDAPThefieldsintheshadowfileareseparatedbycolonsandcontainthefollowinginformation:username:password:lastchg:min:max:warn:inactive:expirepasswordMightcontaintheoneoffollowingentries:·A13-characterencrypteduserpassword·Thestring*LK*,whichindicatesaninaccessibleaccount·ThestringNP,whichindicatesnopasswordfortheaccount也就是说,空密码的root,在/etc/shadow中应该有如下信息:root:NP:6445::::::我看了我的shadow文件#vi/etc/shadowroot::6445::::::按照solaris10在其文档817-1758SystemAdministrationGuide:AdvancedAdministration里提供的的解决办法。WhattoDoifYouForgotRootPasswordIfyouforgettherootpasswordandyoucannotlogintothesystem,youwillhaveto:*Stopthesystembyusingthekeyboardstopsequence.*BootfromabootorinstallserverorfromalocalCD-ROM.*Mounttheroot(/)filesystem.*Removetherootpasswordfromthe/etc/shadowfile.*Rebootthesystem.*Loginandsetroot'spassword.还描述得甚为详细:#vishadow这里为空就没有密码了,然而登陆不上却是事实。
我的root本来是没有密码的。在控制台用root登陆了,执行了sys-unconfig,重新配置了一下系统信息。密码依然留空。(sys-unconfig会清除所有的设置信息,包括root密码,奇怪的是却不会删除其它用户的密码。)再登陆时,突然要我输入密码。
上哪儿去偷呢?想哭~
查看soliaris的文档817–1985–15 SystemAdministration Guide:Basic Administration 的Managing UserAccounts and Groups
(Overview)部分
,里面有说明:
Password information is stored as follows:
· In the passwd file when you are using NIS or NIS+
· In the /etc/shadow file when you are using /etc files
· In the people container when you are using LDAP
The fields in the shadow file are separated by colons and contain the following information:
username:password:lastchg:min:max:warn:inactive:expire
password Might contain the one of following entries:
· A13-character encrypted user password
· The string *LK*, which indicates an inaccessible account
· The string NP, which indicates no password for the account
也就是说,空密码的root,在/etc/shadow中应该有如下信息:
root:NP:6445::::::
我看了我的shadow文件
#vi /etc/shadow
root::6445::::::
按照solaris10在其文档817-1758 System Administration Guide: Advanced Administration里提供的的解决办法。
What to Do if You Forgot Root Password
If you forget the root password and you cannot log into the system, you will have to:
* Stop the system by using the keyboard stop sequence.
* Boot from a boot or install server or from a local CD-ROM.
* Mount the root (/) file system.
* Remove the root password from the /etc/shadow file.
* Reboot the system.
* Log in and set root's password.
还描述得甚为详细:
# vi shadow
(Remove root's encrypted password string)
这里为空就没有密码了,然而登陆不上却是事实。改成root:NP:6445::::::(先用命令"chmod +rw shadow"将文件改为可读写)。还要问我要密码。
又想了一个办法。我还有一个新建的帐户cracker。设了密码为401448ff。其在shadow中的信息为:
cracker:y5mLgGTOxxDdM:13723::::::
将其密码部分复制到root的密码部分
root:y5mLgGTOxxDdM:6445::::::
重启,用401448ff成功登陆!

免责声明:文章转载自《solaris 10 root忘记密码的解决方法》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇SQLSERVER如何查看索引缺失SwitchHosts—hosts管理利器下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

Solaris 11中的变化

Solaris 11发布了好几个月了,用了后感觉好多配置的东东变化不小,写写自己遇到的问题和大家分享一下, 1,如何设置root密码 Solaris 11中root作为一个Role来存在,已经不能直接用root来登陆系统了,必须用系统安装时创建的用户来su成root,那root的密码 是什么呢?root的密码是用创建的用户做第一次su时进行设置的,比如您创...

Linux shadow文件中密码的加密方式

1)查看shadow文件的内容 cat/etc/shadow 可以得到shadow文件的内容,限于篇幅,我们举例说明: root:$1$Bg1H/4mz$X89TqH7tpi9dX1B9j5YsF.:14838:0:99999:7::: 其格式为: {用户名}:{加密后的口令密码}:{口令最后修改时间距原点(1970-1-1)的天数}:{口令最小修改间隔...

oracle10G/11G官方下载地址集合 直接迅雷下载

Oracle Database 11g Release 2 (11.2.0.1.0) for Microsoft Windows (64-bit) http://download.oracle.com/otn/nt/oracle11g/112010/win64_11gR2_database_1of2.zip http://download.oracle.c...

Solaris磁盘镜像恢复

注:此文章笔者实验记录,欢迎大家指正 Solaris磁盘镜像恢复方法一: 系统启动,开机提示子镜像需要维护: 查看磁盘镜像信息 进入系统后,metastat -pc 和metadb #查看镜像状态与metadb数据库状态 替换故障硬盘,并对新硬盘进行格式转化,格式成solaris的磁盘格式 进行恢复 删除故障的metadb数据库...

解决solaris zfs文件系统内存占用过高

# echo ::memstat|mdb -k前较新版本的solaris 10系统中您只需编辑/etc/system 文件添加以下设定: * Restrict ZFS ARC to 8GBset zfs:zfs_arc_max = 8000000000重启系统# kstat -m zfs...

linux的shadow文件

在《Python绝技》这本书的第一个小程序首先展示了针对与unix系统中shadow文件密码的暴力破解的能力,因为之前只是对shadow文件停留在保存了用户密码的阶段,但并没有详细研究,所以周末两天特地花时间好好研究了一下。1.passwd文件和shadow文件在unix早些时候是没有/etc/shadow这个文件的。一个用户的所有信息都只是保存在/etc...