Computing.Net > Forums > Solaris > problem in /etc/passwd entry - root

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

problem in /etc/passwd entry - root

Reply to Message Icon

Name: gunasekaran
Date: April 9, 2003 at 03:20:58 Pacific
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.



Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: April 9, 2003 at 04:24:31 Pacific
Reply:

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.


0

Response Number 2
Name: jayfoo
Date: April 9, 2003 at 07:06:20 Pacific
Reply:

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.



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: problem in /etc/passwd entry - root

root shell change in /etc/passwd www.computing.net/answers/solaris/root-shell-change-in-etcpasswd/286.html

wrong entry in /etc/passwd www.computing.net/answers/solaris/wrong-entry-in-etcpasswd/3175.html

/etc/passwd problem www.computing.net/answers/solaris/etcpasswd-problem/3693.html