Solved

su - root : response: no shell

Posted on 2002-06-14
7
344 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

733 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