Failed to recover root password in Solaris 10 on Sparc CPU Sun Ultra10


 
Thread Tools Search this Thread
Operating Systems Solaris Failed to recover root password in Solaris 10 on Sparc CPU Sun Ultra10
# 15  
Old 04-21-2012
So it looks like chroot cannot find the passwd command. No path I guess.

So should it be:

Code:
 
chroot /a /bin/passwd root

I'm not sure, comments please. (I have no access to a Solaris system right now.)
# 16  
Old 04-21-2012
What says
Code:
ls -l /a/usr/bin/passwd
grep "^login" /a/etc/pam.conf
chroot /a /usr/bin/passwd root

?
# 17  
Old 04-23-2012
Hi, jlliagre,

I just got back to work and get access to this unix box this morning.

I boot it into single user mode and mount filesystem to /a.

It says:

Code:
 
#ls -l /a/usr/bin/passwd
-r-sr-sr-x 1 root sys 27228 Aug 16 2007 /a/usr/bin/passwd
 
#grep "^login" /a/etc/pam.conf
login auth requisite   pam_authtok_get.So.1
login auth required    pam_dhkeys.So.1
login auth required    pam_unix_cred.So.1
login auth required    pam_unix_auth.So.1
login auth required    pam_dial_auth.So.1
 
#chroot /a /usr/bin/passwd root
segmentation Fault

Any thoughts?
Thanks,
Josh
# 18  
Old 04-23-2012
Code:
truss -f chroot /a /usr/bin/passwd root

# 19  
Old 04-23-2012
Hi, jlliagre,

Code:
 
#truss -f chroot /a /usr/bin/passwd root
execve(*/usr/sbin/chroot", 0xFFBFF574, 0xFFBFFF588)  argc=4
resolvepath(*/usr/lib/Ld.so.1", "/Lib/Ld.so.1", 1023) = 12
resolvepath(*/usr/sbin/chroot", "/usr/sbin/chroot", 1023) = 16
 
... many many pages
 
chroot(*1242: write(2, * chroot ( **, 8)  = 8
/a1242: write(2, " / a", 2)                      = 2
"): 1242:  write(2, " " ) :  ", 4)                = 4
No such file or directory1242: write(2, " No such file" .., 25) = 25
1242: write(2, "\n", 1)                           = 1
1242: _exit(1)

Sorry. It's way too long, I cannot type by hand. There is no connection or USB that can send data out either at this time.

I'll post more later

Thanks,
Josh

---------- Post updated at 08:47 PM ---------- Previous update was at 07:03 PM ----------

Hi, Jlliagre,

I went to next door and grabbed their x86 machine with Solaris8 for comparison study. Here are what I found:

Sun X86 Solaris 8 machine -

Code:
 
#uname -sr
SunOS 5.8
# grep root /a/etc/passwd /etc/passwd 
root:x:0:1:Super-User:/:/sbin/sh
root:x:0:1:Super-User:/:/sbin/sh
#head /etc/group
root::0:root
other::1:
bin::2:root,bin,daemon
...

Sun UltraSparc10 Solaris 10 machine -

Code:
 
#uname -sr
SunOS 5.10
# grep root /a/etc/passwd /etc/passwd
root:x:0:0:Super-User:/:/sbin/sh
root:x:0:1:Super-User:/:/sbin/sh
#head /etc/group
root::0:
other::1:root
bin::2:root,daemon
...

I read Oracal document and it says that group "0" is reserved for root. But the Solaris 10 assigns group "1" to root. I just don't know if these differences are significant here. Should I make the Solaris 10 the same as in Solaris 8? Or these are the typical setup difference exist between Solaris8 and Solaris10.

Any comments?

Thanks,
Josh

Last edited by fromtexas0; 04-24-2012 at 10:57 AM..
# 20  
Old 04-24-2012
I expected the truss command to be run in single user mode and root file system mounted on /a. This doesn't seem to be the case in your reply.

The root group discrepancy shouldn't matter.
This User Gave Thanks to jlliagre For This Post:
# 21  
Old 04-24-2012
Hi, jlliagre,

I boot it into single user mode and mount filesystem to /a.

It says:


Code:
 
#truss -f chroot /a /usr/bin/passwd root
... (moving too fast to catch the print
... many many pages 
... (followings are the end of it)
71:  close (7)
71:  close (8)
71:  munmap(oxFF390000, 8192)
71:  mmap(0x00010000, 24576, PROT_READ|PRTO_WRITE|PROT_EXEC, MAP_PRIVATE|0x300, -1, 0) Err#9 EBADF
71:          Incurred fault #6, FLIBOUNDS %pc = 0xFF145664
71:             siginfo: SIGSEGY SEGV_MAPERR addr=0x000000E4
71:           Received signal #11, SIGSEGV [default]
71:             siginfo: SIGSEGY SEGV_MAPERR addr=0x000000E4
71:                  *** process killed ***

Sorry. It's way too long, I cannot type by hand. There is no connection or USB that can send data out either at this time.

Thanks,
Josh

---------- Post updated at 03:38 PM ---------- Previous update was at 08:54 AM ----------

Hi, Jlliagre,

I think I find the problem.

I boot it into single user mode and mount filesystem to /a.

I went to next door again today and grabbed their x86 machine with Solaris8 for comparison study. Here are what I found:

Sun X86 Solaris 8 machine -

Code:
 
# head /a/etc/shadow 
root:xyxyxyx:15087::::::
daemon:NP:6445::::::
...

Sun UltraSparc10 Solaris 10 machine -

Code:
 
#head /a/etc/shadow

root::6445::::::
daemon:NP:6445::::::
...

On this Sun Ultra10, the 1st row is blank.
The root starts from the 2nd row.
The Sun x86 Solaris 8 has root starting on the 1st row.

I didn't know if this was significant. But I went ahead and deleted this 1st blank row anyway. Once umount /a and reboot the system, I can login using username root without password!!!

WoW!!!

The blank 1st row in the shadow file caused all these trouble. THe vi or grep commands couldn't see this blank 1st row easily. One of the previous owners must have attempted with it. Or I accidently created this blank row, maybe. I checked the copy of the original shadow file. It had its 1st row empty!

Thank you Jlliagre for sticking with me for all those times. Thanks for everyone on this forum for replied my posts.

Thanks,
Josh
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How recover the root password - Solaris 11?

Hello forum members, Please help me to recover the root password. I have had difficulties working with Solaris 11. The run-level equivalents single-user in Solaris 10, I can mount disk in one partition and edit files shadow/passwd. For example: {0} ok boot cdrom -s # mount... (4 Replies)
Discussion started by: Marcela Bueno
4 Replies

2. UNIX for Dummies Questions & Answers

How to recover root password on SuSE?

Hi, We forgot the root password on SuSE version 10 server. Since I didn't have SuSE DVD, I started the server using Redhat. I updated /etc/shadow and removed the root password. I then started the server and I still can't login using root. Any idea? One more question, on Novell web... (6 Replies)
Discussion started by: samnyc
6 Replies

3. Solaris

SNMP - cpu core information for Sun SPARC machine

Dears, I'm looking for getting CPU cores information of Sun machines (like: SunFire V880, Fujitsu SPARC T5120, ...) via SNMP, unfortunately i couldn't find the proper OID for that. Can anyone help me with this ? Thanks, (1 Reply)
Discussion started by: Anti_Evil
1 Replies

4. Red Hat

How to recover the root password?

Hello forum members, Please help me to recover the root password. i can login with the user in redhat linux but i forget root password. so pleas help me to recover. advance thanks siva. (2 Replies)
Discussion started by: workforsiva
2 Replies

5. Solaris

Recover root password

How can I recover root password :wall: 1) I am running Solaris 10 (X86) through VMware for practicing. 2) I was practicing root password recovery and deleted the password in /etc/shadow file. 3) Neither cant login the to the CLI nor Console 4) Selected the Soalris X86 failsafe in... (4 Replies)
Discussion started by: vijaykrishna
4 Replies

6. AIX

How to recover root password in AIX ?

Dears, We have Oracle Database installed on AIX Version 5.3 and we have to take action urgently but must by root user but unfortunately we lost password. How to recover root password? Please, be noted that I am Oracle DBA and do not have experience in dealing with AIX Systems. Please, advise... (3 Replies)
Discussion started by: mohammedmostafa
3 Replies

7. UNIX for Dummies Questions & Answers

root password on aix lost, how to recover

Hi guys, we have "forget" the root password for 1 of our AIX machines, how can we reset it? or recover it?? Thanks (1 Reply)
Discussion started by: prpkrk
1 Replies

8. Solaris

Need to recover 'root' password

Dear All, I have lost my data backup server's root password, just have a normal login username and password ..but i need to get back my root passwd....any1 can help me out plz :confused: (7 Replies)
Discussion started by: abir
7 Replies

9. Solaris

How to recover root password

How to recover root password in solaris, I forgot root password. thanks in advance (2 Replies)
Discussion started by: durgaprasadr13
2 Replies

10. Solaris

Recover root password

I need to recover root password on a test server (E 10k) running solaris 9. Can someone please tell me how to do this? (1 Reply)
Discussion started by: nitinkgoud
1 Replies
Login or Register to Ask a Question