LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 01-07-2004, 04:37 PM   #1
m3kgt
Member
 
Registered: Oct 2003
Location: WA
Distribution: Redhat 3.0ES & Slackware 8.1
Posts: 44

Rep: Reputation: 15
forgot root password for solaris 9


How can I reset the root password on my solaris9 machine? The guy who was working on it previously (no longer with the company) installed Solaris8, I just installed Solaris9, the upgrade seemed to go fine, now it is time to log in but I dont seem to have a record of what the previous employee set the root password to. Is there a way I can boot into single user mode and reset the password for root?

As always, thanks for the help.

Joe
 
Old 01-07-2004, 05:09 PM   #2
m3kgt
Member
 
Registered: Oct 2003
Location: WA
Distribution: Redhat 3.0ES & Slackware 8.1
Posts: 44

Original Poster
Rep: Reputation: 15
Ok, I was able to get into single user mod by bootting from the CD using the following..

<stop> + <a>
ok boot cdrom -s

rebooted the computer from the CD into single user mode. Now I am at the # prompt trying to figure out how to change the root password. I did the standard passwd and tried to change it that way, it says "permission denied". So i navigated to /etc/ and opened the passwd file in what i THINK is a type of vi editor and I tried to remove the root password from there, but it says the file is read only. So I tried to fo a chmod on the file and it says "WARNING cant change passwd". So basically I am stuck agian.

How do I reset the root password now that I am in single user mode booted from the install CD?

Thanks,
Joe
 
Old 01-07-2004, 09:21 PM   #3
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Mount the / slice to /mnt. The /etc that you went into was the /etc on the CD.

Last edited by stickman; 01-07-2004 at 09:25 PM.
 
Old 01-08-2004, 10:24 AM   #4
m3kgt
Member
 
Registered: Oct 2003
Location: WA
Distribution: Redhat 3.0ES & Slackware 8.1
Posts: 44

Original Poster
Rep: Reputation: 15
When i try to mount / to /mnt, I am not sure which device I am suppose to mount. When I go into /dev/dsk/ I see about 25 different things.

c0t0d0s0
c0t0d0s1
c0t0d0s2
c0t0d0s3
c0t0d0s4
c0t0d0s5
c0t0d0s6
c0t0d0s7
c0t1d0s0
c0t1d0s1
c0t1d0s2
c0t1d0s3
c0t1d0s4
c0t1d0s5
c0t1d0s6
c0t1d0s7
c0t2d0s0
c0t1d0s1
c0t1d0s2
c0t1d0s3
c0t1d0s4
c0t1d0s5
c0t1d0s6
c0t1d0s7

Which one of those am I suppose to mount? I would just try every one, but its becoming a pain, mainly because I dont seem to be able to umount the device after mounting it. Every time I try to umount it says device is busy. Is there a standard here, or does this have to do with the way the HD is partitioned?
 
Old 01-08-2004, 04:35 PM   #5
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Can you log into the system with any account? If so, do a "df -k" to see which slice is mounted to /. On a typical system, it's probably c0t0d0s0 or c0t0d0s1, but it really depends on how the system was setup. Also, what commands are you doing to mount and umount the file system? If the slice mounts, just do a "ls /mnt" to see what got mounted. The file systems should be pretty identiable by what in there.
 
Old 01-08-2004, 05:07 PM   #6
m3kgt
Member
 
Registered: Oct 2003
Location: WA
Distribution: Redhat 3.0ES & Slackware 8.1
Posts: 44

Original Poster
Rep: Reputation: 15
Ok, I was able to get the root directory mounted... c0t0d0s1 was the winner.

EDIT:

I got the vi editor to perform properly now, so I deleted the x in the passwd file for the root account, so now it read something like

root::0:1:blah blah bla

the X used to follow the root passwd. So now I reboot the server, and try to login using the root account without a password, and of course... it doesnt work.

So now what do I do?

Last edited by m3kgt; 01-08-2004 at 05:32 PM.
 
Old 01-08-2004, 09:36 PM   #7
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Passwords in Solaris are in /etc/shadow. Put the X back.
 
Old 05-26-2004, 11:38 AM   #8
jacko0
LQ Newbie
 
Registered: May 2004
Posts: 3

Rep: Reputation: 0
Hi, I have exactly the same problem! But if i use df -k i dont see any disk Logical Device name's like c0t0d0s0 mounted to anything. Just /pci@8,700000/scsi@6/disk@6,0:b mounted on /

I have also found the /etc/shadow file and tried to delete the root password but I cant save the changes as I get a read only error. So i tried saving the file with the vi command :!w But still no luck :-(

Has anyone got any ideas?

Thanks
 
Old 05-26-2004, 01:58 PM   #9
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
When you boot from CD, you won't see any of the regular disks with "df -k" unless you mount them. What you do see mounted at / is the CD. You need to mount internal root slice. It's typically c0t0d0s0 (or s1 if s0 is swap) so do something like:
mount /dev/dsk/c0t0d0s0 /mnt

Then go into /mnt/etc and edit the appropriate file. The top level /etc is the one on the CD. If you've got any sort of volume management, then the task is a bit more complex.

Last edited by stickman; 05-26-2004 at 02:01 PM.
 
Old 06-15-2004, 04:49 PM   #10
plastikman187
LQ Newbie
 
Registered: Jan 2004
Posts: 2

Rep: Reputation: 0
I am currently looking at my shadow file and it reads
root:<password?>::123546


what would i edit to be able to reset the password?
 
Old 06-16-2004, 02:03 AM   #11
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Just leave the second field empty, dont change the remaining of the line:

root::...
 
Old 08-26-2008, 04:53 PM   #12
Shabda
LQ Newbie
 
Registered: Aug 2008
Posts: 1

Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by jlliagre View Post
Just leave the second field empty, dont change the remaining of the line:

root::...
It works!

Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Forgot root password Action Linux - Newbie 1 07-07-2005 07:09 PM
Forgot root password maxboost Linux - General 3 03-21-2005 02:43 AM
forgot root password ali_hammad Linux - Security 4 03-08-2005 02:44 PM
forgot root password jeempc Slackware 14 02-08-2004 08:02 AM
forgot root password samik_ban Linux - Newbie 3 10-16-2003 07:34 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 12:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration