LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Lost root password (https://www.linuxquestions.org/questions/solaris-opensolaris-20/lost-root-password-325938/)

zillah 05-22-2005 10:49 AM

Lost root password
 
I have lost root password for Soalris V10 Intel platform, I have read many cases similar to mine (http://www.techgirl-net.com/root.shtml
http://www.geocities.com/~gregl/htm/s86faq.html,)

I used CD 1 / 4 (I have got 4 CDs for Solaris V10) to boot the PC, and I typed b –s instead of these options :

1- Solaris Interactive
2- Custom Jumpstart
3- Solaris Interactive Text (Desktop session
4- Solaris Interactive Text (Console session)

Select type of installation: b –s
The output was:


Boot file: kernel/unix
Arguments: -s

/pci@0/pci-ide#if,1---------------------------------------------------------
Short read
* * * * *
* * * * *
* * * * *------------output omitted
* * * * *
* * * * *

Krtld: error during initial load/link phase
Booting kernel/unix……………………
Short raed. 0xffffffff chars read
Not found: core
Not found: slowscan
Not forund:minfree

Krtld: error during initial load/link phase

>

I am doing right thing?

Is the right CD has been used ?

Why I am not receiving "#" prompt instead of ">"?

And I read some case you have to use console to recover password, (cosole similar to cisco router and switch,,,,see this http://www.unix.com/showthread.php?s=&threadid=9488)

jlliagre 05-22-2005 03:22 PM

You are doing the right thing, but unfortunately are probably hitting some timing bug ...

I think you can overcome that by starting a graphical installation, and while you are under a window manager, launch a console window and do the rest of mounting and /etc/shadow editing the same way as suggested in the links.
Perhaps a text installation can also be stopped (^C), and let you under a root shell to go forward too.

zillah 05-23-2005 01:25 AM

Quote:

I think you can overcome that by starting a graphical installation, and while you are under a window manager, launch a console window and do the rest
I did what you have suggested, but how can I find what is the real partition for my PC, because I have 2 OSs on Desktop (Manadrake and Solaris), and I have to use this command for mounting:

(( mkdir /tmp/hdrive
mount /dev/dsk/c0t0d0s0 /tmp/hdrive #SCSI; for ATAPI/IDE, omit "t0")) from this site:
http://www.geocities.com/~gregl/htm/s86faq.html ))


A- Which command can I use to find the real controller(c) and the real disk (d) and the slice (s) for my Desktop?


I used :

1- df -k

2- cat /etc/vfstab

They were not helpful.

jlliagre 05-23-2005 05:40 AM

Try /dev/dsk/c0d0s0 , it is usually a good bet.

zillah 05-23-2005 08:42 AM

Quote:

Try /dev/dsk/c0d0s0 , it is usually a good bet.
I did , it did not work

jlliagre 05-23-2005 08:48 AM

run "format" (/usr/sbin/format), it will show you all the disks available, extrapolate the solaris slice from that. e.g.:
Code:

# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
      0. c0d0 <DEFAULT cyl 20314 alt 2 hd 16 sec 63>
          /pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0
Specify disk (enter its number): ^C


zillah 05-23-2005 09:04 AM

Thanks for the quick reply, I will try and let you know

zillah 05-24-2005 12:18 PM

Thanks jlliagre

I followed your advice and It worked fine.


For my knowledge , could you please tell me why it has been written in many discussion forums this:

(( Next we need to find out where the root partition is mounted, login into the server as a normal user and type: df -k /

Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 241543 195738 21651 91% / )), see this :http://www.computing.net/solaris/www...orum/3345.html

Is this for SPARC Machine only ? Why did not work with me ?

jlliagre 05-24-2005 01:15 PM

The problem is not related to the CPU architecture (SPARC or x86 or x64).
It would have worked with you too if you had run the "df -k /" while logged in as a non root user on a regular Solaris session.
When you are in installation mode, / isn't mounted to the root slice, it's too soon ...

zillah 05-24-2005 04:07 PM

Is there any procedure lets me create a second administrator with root previlidge ?

jlliagre 05-24-2005 05:28 PM

I do not support that, my opinion is that there should be not even a single user with root privilege.
Regular accounts should be given partial or full privileges on demand instead, just like with sudo or better with Solaris 10 roles (RBAC).

If you are lazy and don't want to explore these methods, the simplest way is to create an alias of root (same uid = 0), but a different loginname and password.


All times are GMT -5. The time now is 12:51 AM.