LinuxQuestions.org
Visit Jeremy's Blog.
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 04-23-2007, 06:11 AM   #1
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Rep: Reputation: 30
Corrupted /etc/passwd


Hi

I have installed solaris 9 on my Intel Box at home. Once I have changed the defaukt sheel for root as /sbin/bash instead of /sbin/sh. After that when I have restarted the solaris, it will not allow me to login as it showes the error as "Invaild Shell". Now can you suggest me how I can resolve this issue without reinstalling the os.

Thanks in advance
 
Old 04-23-2007, 07:04 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You should boot your box using the installation CD and then mount your disk to /a, i.e:
Code:
mount /dev/dsk/c0d0s0 /a
Then change dir to /a/etc and edit your /etc/passwd replacing /sbin/bash with /usr/bin/bash.
 
Old 04-23-2007, 07:41 AM   #3
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Hi

As I have tried to boot from cd , but I am not able to get prompt. Can you brief me on steps in intel pc
 
Old 04-23-2007, 08:51 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You have to put
Code:
b -s
when prompted for the type of installation you want to perform. You can also do the same while booting from the boot disk when prompted to select (b)oot or (i)nterpreter.
 
Old 04-28-2007, 05:51 PM   #5
javier.e.menendez
Member
 
Registered: Jan 2006
Posts: 168

Rep: Reputation: 30
the problem was that you changed it incorrectly. The path to the bash shell is /bin/bash. You will have to boot from the cd into single user mode, mount the root file system into /a or /mnt in the cd and edit /etc/passwd to put back the correct shell. Also, don't forget to set your editor variable and terminal variable.

Once you do that, just reboot and you are done.
 
  


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
Swat uses PAM but changes linux passwd not samba passwd Peter@KKVS Linux - Networking 0 11-26-2006 04:20 AM
root passwd corrupted ? themouser Debian 5 10-27-2006 10:41 PM
corrupted tar.gz... jsheffie Linux - Software 2 03-31-2006 01:08 PM
corrupted fs, please help class_struggle Linux - Newbie 8 08-21-2004 06:22 PM
Corrupted /etc/fstab nxny Linux - General 15 09-01-2003 09:06 AM

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

All times are GMT -5. The time now is 02:52 AM.

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