Solved

su - root : response: no shell

Posted on 2002-06-14
7
328 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
  • 3
  • 3
7 Comments
 
LVL 38

Expert Comment

by:yuzh
Comment Utility
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
Comment Utility
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
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 4

Expert Comment

by:besky
Comment Utility
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
Comment Utility
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
Comment Utility
Right, sorry. My misstake.
0
 

Author Comment

by:anil27
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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 …
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now