Solved

su - root : response: no shell

Posted on 2002-06-14
7
347 Views
Last Modified: 2013-12-27
I changed the sheel of root from /usr/sh to /usr/ksh. Which I think is not there. SO i am not able to log in as root.
How do i overcome this.
thanks
0
Comment
Question by:anil27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 7077617
Please check your /etc/passwd file

the default login shell for root is /sbin/sh, if you want to change it to ksh, it should use: /usr/bin/ksh

I suggest you change the shell for root back to /sbin/sh.
0
 
LVL 4

Expert Comment

by:besky
ID: 7077624
You missed something, leaving it
as /sbin/usr/ksh is a common one.

Good news is, if you are running Solaris 9,
there is fallback shell if you stop the machine
and boot it into single user with boot -s
Bad news, it doesnt work in previous releases.

There you have to take your Solaris CD, put it in
boot with: boot cdrom -s
when its up do a mount:
mount /dev/dsk/c0t0d0s0 /a
set TERM=vi
export TERM
vi /a/etc/shadow

remove everything between first and second colon
so it looks like this
root:: and leave the rest as it were

Have fun *L*

do an: umount /a
and reboot the system

Sorry, no other way to do it
0
 
LVL 38

Accepted Solution

by:
yuzh earned 50 total points
ID: 7077710
boot up systems from CDROM as besky comment, change the passord file NOT shadow file, if your mount the root partition on /a, then:

vi /a/etc/passwd

BTW, ksh is located at /usr/bin NOT /sbin/usr/ksh


0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:besky
ID: 7077784
I have no problem with people correcting me when Im wrong but otherwise ...

The password was moved to the /etc/shadow file many many years ago.
The passwd filed in the /etc/passwd only holds an "x", leave it that way.

Trust me, every single Solaris training course
someone does this. TG for finally solved in S9.

0
 
LVL 38

Expert Comment

by:yuzh
ID: 7078238
What I mean is that to change the login shell need to edit the /etc/passwd file, the real "PASSOORD" is in /etc/shadow !

As anil27 wants to fix the login shell, NOT delete the passord that why I put my previous comment on.
0
 
LVL 4

Expert Comment

by:besky
ID: 7078241
Right, sorry. My misstake.
0
 

Author Comment

by:anil27
ID: 7082848
Thanks yuzh.I am using solaris 8. I was wondering what to change in /etc/shadow for shell.
The problem is solved after changing entries in /etc/passwd.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question