problem in /etc/passwd entry - root
|
Original Message
|
Name: gunasekaran
Date: April 9, 2003 at 03:20:58 Pacific
Subject: problem in /etc/passwd entry - root OS: Solaris 5 CPU/Ram: 128 MB
|
Comment: when i login as root ,i mistakenly change the login shell value that is specified in /etc/passwd file. obiviously i can't login as root, i can't change the entry also. i try the 'su' with all options, exec login also , i couldn't recover it. Is there any solution to recover except reinstall the o.s Thanking for ur response that will help me.
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: David Perry
Date: April 9, 2003 at 04:24:31 Pacific
|
Reply: (edit)The same answer applies to you as someone who lost the root password. You will need to boot from cd then mount your existing installation and fix the /etc/passwd file. Have a look through the archives here as it has been dealt with in detail many times.
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: jayfoo
Date: April 9, 2003 at 07:06:20 Pacific
|
Reply: (edit)1: Insert Solaris CD in cd drive and from ok prompt run command: boot cdrom -s 2:This will take you single user mode # fsck /dev/rdsk/c0t0d0s0. Answer y to clear all. 3:mount /dev/dsk/c0t0d0s0 /a 4:cd /a/etc 5:TERM=sun 6:export TERM 7:vi /a/etc/shadow remove apssword form password field of root. and save file with wq! 8: cd / 9:unmount /a 10: init 6 You will be prompted for password for root. That's it.
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: