1844600 Members
2742 Online
110233 Solutions
New Discussion

Re: Root shell invalid

 
SOLVED
Go to solution
Borislav Perkov
Respected Contributor

Re: Root shell invalid

Yes but instead of /a use already created /mnt.
With mount command or df -k you can find which partition you have to use. In most of cases it is /dev/dsk/c1t0d0s0 partition, but check anyway.
RAC_1
Honored Contributor

Re: Root shell invalid

When you boot into single mode, you will not be asked for password. So once you are in single user mode, do mountall. back up password file and modify iy to reflect the correct shell.
There is no substitute to HARDWORK
Borislav Perkov
Respected Contributor

Re: Root shell invalid

RAC there will be no adequate shell for root again if he boot in single user mode not from CD.
Regards
Robert-Jan Goossens
Honored Contributor

Re: Root shell invalid

c. The shell may have been changed to an entry that is not supported in the
system. For example, in an attempt to have the root user log in with csh,
the above entry may be changed, resulting in the login shell being
/sbin/csh.

There is no /sbin/csh. The csh executable is in /bin.

To correct this problem:

1. Boot from the Solaris 2.x CD-ROM.
2. Answer the configuration questions.
3. When the suninstall menu appears, exit to a shell "Abort without
installing."
4. Mount the root partition to /a. For example:

mount /dev/dsk/c0t3d0s0 /a

5. cd /a/etc
6. Edit the passwd file and change the login shell for root to /bin/csh

Vassilios
Frequent Advisor

Re: Root shell invalid

Borislav,

Doing a df -k,
I get the following:

File system .......... mounted on
/dev/md/dsk/d0 .......... /
/dev/md/dsk/d3 .......... /usr
....
...
...

So, i can assume that the root file system is in fact d0.

so, i need to do the following:

* boot cdrom -s
* mount /dev/md/dsk/d0 /mnt
* vi /mnt/etc/passwd

Would that be correct? Is there anything missing?

Thanks a lot!
Borislav Perkov
Respected Contributor

Re: Root shell invalid

Yes!
But don't forget that you should exit to shell from the installation menu which apears after you boot from disk. Good luck.
Vassilios
Frequent Advisor

Re: Root shell invalid

Borislav,

I'm at the point where im mounting the filesystem:

mount /dev/md/dsk/d0 /mnt

This comes back with an error message:

mount: /dev/md/dsk/d0 or /mnt, no such file or directory.

However, i know that /mnt exists; and i know that /dev/md/dsk/d0 exists as we checked that in the beginning.

What do you suggest?
Borislav Perkov
Respected Contributor

Re: Root shell invalid

Try to find any empty directory on the CD. type ls -l command and send me the output
Vassilios
Frequent Advisor

Re: Root shell invalid

Hi,
I dont understand what you mean by empty directory on the CD. Its a CDROM.

Regards
Borislav Perkov
Respected Contributor

Re: Root shell invalid

just send the output of ls -l
Vassilios
Frequent Advisor

Re: Root shell invalid

It boots from the CDROM, and then it tell me to specify the kernel, Then it fails when loading the kernel from the CDROM. I think its to do with the hardware ...

Greg Vaidman
Respected Contributor

Re: Root shell invalid

What is the path to the invalid shell you entered? If it's in a writable directory, you could just copy a legitimate shell into that directory using another user account.
Of course, that's a big "if", but it's much simpler than what you're going through now.

BTW, it's obviously NOT best practice to use a shell from a directory writable by anyone other than root.
Borislav Perkov
Respected Contributor

Re: Root shell invalid

Maybe you have now problems with CD-drive or with the CD. Anyway, when you boot it make the directoy first:
mkdir abcd and than try to mount the partition on it.
Regards,
Borislav
Vassilios
Frequent Advisor

Re: Root shell invalid

Hi gents,
OK, i have a bootable CD, but its just to boot up a system. Can i use this? The official sun solaris 8.0 CD isnt booting, and it cant find the right kernel to boot.

Cheers
Borislav Perkov
Respected Contributor

Re: Root shell invalid

You can try it. if it gets you to single user mode you can try the procedure.
Tom Smith_9
Frequent Advisor

Re: Root shell invalid

You could try restoring the passwd file from backup, that worked for me once. (Omniback)
Vassilios
Frequent Advisor

Re: Root shell invalid

OK. Thanks everyone, i managed to fix it. I'll email u all a sequence of steps i've done. Most comments here helped, but i ended up doing everything a slightly different way.

However, i really truly wish to thank all of you. I'm very very serious. The response time was amazing, and if it wasnt for the direction i received on this website, it would have taken far far longer to resolve.

If ever anyone here is in Paris, let me know, I owe you all a drink!!