?
Solved

su - root : response: no shell

Posted on 2002-06-14
7
Medium Priority
?
348 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 200 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
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 navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

770 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