Forget the root password on SunBlade
I inadvertadly changed my root password on my SunBlade100 test computer.
Is there any way I can figure it out without having to reconfigure the whole OS.
First ,if you know what file system is used is Solaris zfs, then you need a live distro
or rescue disk for Solaris. When you run off a live distro or rescue disk, the root
filesystem exists in memory.
Look at the output of the “mount” command by itself to see if the hard disk partitons
are mounted. If not, you will want to mount the root partition somewhere such as mount.
There are a lot of ifs here, such as whether the kernel your live distro or rescue disk
uses is able to mount the partition rw. Solaris will use different device names for
There are in /dev/ and probably end in p1 for the first partition, p2 for the second, etc.
If your disk has the fdisk program (I don’t know if solaris has its own version of this
program), running “fdisk -l” will list the partitions. You need to use the mount
command to mount the partition that has the /etc directory.
It should be on the root partition. I can’t see anyone wanting to mount it anywhere else.
Look at the /etc/passwd file. If there is a line like: “root:x:0:0:root:/root:/bin/bash” with
the second field of “x”, then the system uses shadow passwords. The password hash
is in /etc/shadow. Otherwise, you may see a lot of random characters between the first
and second colons. Look at the /etc/shadow file at the entry starting with “root”:
Delete the characters between the two colons to zero the root password.
This means you can reboot and login as root with no password. Then run “passwd”
as root to change the root password. If you have a system that doesn’t allow a null
password for root, this mean that you will not be able to login after zeroing out
the password hash in /etc/shadow.
In this case you have to copy the hash from the regular users entry and copied it for
root’s. That will allow you to log in as root using the regular user’s password and then
to run “passwd” to change it.
Like us on Facebook
We need your assistance to stay live
This week Top Posts
- Wow! Linux Foundation To Offer Free Linux Course This Summer Worth $2,400 on EdX : Wow! Early last week it was all over the internet, if you haven't heard it yet then this is the t...1 comment |
- Grive: An Unofficial, Open Source Linux Client For Google Drive : A couple of months before, we have featured a Linux client for Google Drive named Syncdrive, which w...1 comment |
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- How To "Fix E: Could not open file /var/lib/dpkg/status" : QUESTION: I get the following error when I use sudo apt-get update: E: Could not open file /var/...0 comments |
- Install Sublime Text 3 In Fedora Easily With Fedy : Sublime Text is a sophisticated text editor for code, markup and prose. In this tutorial we are goi...0 comments |
- Install nSnake Game In Terminal : From github repo nsnake is a clone of the classic snake game that we all used to play on our cellp...0 comments |
- Install Sublime Text 3 In Fedora Easily With Fedy
- Grive: An Unofficial, Open Source Linux Client For Google Drive
- Install nSnake Game In Terminal
- How To “Fix E: Could not open file /var/lib/dpkg/status”
- Wow! Linux Foundation To Offer Free Linux Course This Summer Worth $2,400 on EdX
- Fedora 21 Scheduled For Release In October
- Install Uget Download Manager In Ubuntu, Fedora, Debian
- Download Elementary OS ‘Luna’ Official Wallpapers
- Install Power Commands 0.1.5 On Ubuntu 14.04/13.10/12.10/12.04
- 5 Android Apps that’s Going to Make Running Your Business Less Stressful
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .