Solaris / OpenSolarisThis forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I can just hear the thoughts as the thread is read... I'll just say I know I messed up real bad and any/all help I can get to retrieve login short of reinstalling would be awesome. The system is Solaris 10 on a SunBlade 1000 with a gig of RAM.
The problem: I modified the /etc/passwd file and changed the shell for root but included an extra / in the path for the shell. Obviously, now, when attempting to login with the root account, I'm prompted with, "Unable to login, invalid shell".
What I've tried: I got to the ok> prompt and typed boot cdrom -s and modified the /etc/passwd to the correct path for the shell but, lo and behold, I'm probably not modifying the right file considering I booted off a cdrom disk. So, the question becomes, I suppose I need to mount my hard drive from the # prompt so that I can modify the passwd file. The prroblem is, I'm not entirely sure what that should be. I know I have an ide hard drive and I did try to mount what I thought to be the path, but obviously I'm doing something wrong. The system is in another side of the building so I'll have to go back and forth to it when information is requested which is no big deal, just FYI. Any/all help would be awesome. Perhaps there's a faster way to do this than booting from cdrom, but I'm not the guru on Solaris 10.
Thanks in advance and please let me know if I need to include more information than what I've given.
It happens to the best of us. I know I've done it a few times in the past. He's what I did to fix it.
At the ok prompt do the boot cdrom -s
When the system comes up mount what you think is your root partition to /a
ie; mount /dev/dsk/c0t0d0s0 /a
Then cd /a/etc
Set your term so vi dosen't look all weird.
Then vi passwd
Fix the file, save it and you should be all set.
shizzyt - thanks! I actually just mounted the /dev/dsk/ to /mnt which seemed to work. From there, I vi'ed /mnt/etc/passwd which allowed me to change what I needed to change. Of course, as if on cue, I found the "exec" command for changing things for the root account so that one doesn't have to hold one's breath while editing such an important file.
You can also try to switch to Single user mode without booting from cdrom.
gs_tahmeed - awesome! Didn't know that.
Anyway, it is always a wrong idea to change root's shell.
jlliagre - I agree completely! lol... So idiotic on my part, I know... Guess it all goes back to that ole adage, "RTFM". Heh heh heh...