Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

su - root : response: no shell

Posted on 2002-06-14
7
Medium Priority
?
352 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
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 how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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

609 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