- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- shell problem
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2003 04:32 AM
05-05-2003 04:32 AM
When I try to logon or even ftp as root, it simply comes back and says No shell. I can not copy the /usr/bin/ksh to /sbin as I do not have the correct permissions.
HPUX 11.i
Any suggestions?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2003 04:39 AM
05-05-2003 04:39 AM
Re: shell problem
Hello,
Try the following:
who
and look for anyone logged in as root.
If yes find her and have her change
/etc/passwd.
. boot in single-user mode.
No matter how you fix this, my advise is to
never change the login-shell for root.
/sbin/sh is special is it does not depend
on shared libs like all other shell do.
Olav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2003 04:41 AM
05-05-2003 04:41 AM
Re: shell problem
If that does not work, you are left with booting off of the cd and fixing the file. You should (depending on what version of HP-UX) get a menu once booted on the cd that will allow you to run in a limited environment.
HTH
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2003 04:47 AM
05-05-2003 04:47 AM
Re: shell problem
better consult this thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1e88abe92dabd5118ff10090279cd0f9,00.html
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2003 04:48 AM
05-05-2003 04:48 AM
Solution1. try if booting in single user mode helps.
2. do you have an entry in /.rhosts. then try rcping the ksh file or a copy of the passwd file with correct entry.
3. login as ordinary user and then try a su and see if it works.
and never change the shell of root. it is normally in /sbin directory and even if you dont have your usr volume mounted, u can still login as root.
-balaji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2003 05:07 AM
05-05-2003 05:07 AM
Re: shell problem
I will need to boot off the HPUX 11.i recovery CD in order to correct this. The su - root /bin/sh did not work and nothing else did either.
Thanks.
Nickd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2003 06:01 AM
05-05-2003 06:01 AM
Re: shell problem
And what if you have "+" in /.rhosts and "rcp /bin/ksh server:/sbin/ksh" where server is your computer.This way no shell executed,though these "high security" times
many sysadmins are paranoid about "+" in rhosts.:).
Best wishes
Zeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2003 07:02 AM
05-05-2003 07:02 AM
Re: shell problem
if you can remsh into the box with another account. and copy ksh to the correct directory.
also if you plan to build a bastian box, by moving root's home directory the there are a few steps you need to perform. otherwise you'll find yourself in the same predicament.
mkdir /root
cp .profile /root/.profile
edit /etc/passwd
and change roots home dir to /root
peace
Donny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 05:51 AM
05-06-2003 05:51 AM
Re: shell problem
Could you somehow, as another user, copy /sbin/sh into /sbin/ksh?
Take care.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 08:56 AM
05-06-2003 08:56 AM
Re: shell problem
When booting off the CD, you will not have access to all the libraries and executables that you normally have. One thing you can do is mount the / file system to the /mnt (or some other) directory, then cd into that directory.
One thing you can do is type "echo MYNAME::0:3::/:/sbin/sh>>/mnt/etc/passwd". This sets up new user called MYNAME and gives it root equivalency without a password. You can do this because when you boot off the CD, you only have root access.
Then log off and reboot the computer as normal. When you login as MYNAME, you can then use vipw to fix the entry for the root account. Since this is a HEINOUS security violation, immediately remove the MYNAME account thereafter.
Of course, I recommend that you make a copy of the /etc/passwd file first.
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 12:04 PM
05-06-2003 12:04 PM
Re: shell problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2003 12:24 PM
05-06-2003 12:24 PM
Re: shell problem
cp /etc/passwd /root/passwd
rcp(or scp) other_system://etc/passwd /etc
use vi to delete all but the root entry from this passwd file.
use vi to delete the root entry from the /root/passwd file.
cat /root/passwd >> /etc/passwd
Of course you need to know the root password from the other system.
You should be able to pull this off no matter what root's shell is. Of course I know you'll never modify roots shell entry again.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com