- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- bad shell error and can't get into multiuser mode
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
03-11-2001 09:00 AM
03-11-2001 09:00 AM
bad shell error and can't get into multiuser mode
I had to reboot our unix machine and now after boot-up it is displaying an error.
BAD SHELL "opt/bash/bin/bash" FOR ROOT
FIX ROOT ENTRY IN ETC/PASSWD AND REBOOT.
From what I recall, a vendor installed the new Bourne Again shell a few weeks ago. I feel this is the root of the problem but I'm not sure how to correct this at the moment.
What can I do to correct this problem??
This is a critical server in our company.
thank you,
Oskar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2001 09:19 AM
03-11-2001 09:19 AM
Re: bad shell error and can't get into multiuser mode
The way to change this is to boot into single used mode and edit the passwd file to change root's shell back to /bin/sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2001 10:32 AM
03-11-2001 10:32 AM
Re: bad shell error and can't get into multiuser mode
Patrick is right -- never specify anything other than the POSIX shell for the root shell. You should specify '/sbin/sh' however, since '/bin' is really a transition link to '/usr/bin/'.
Filesystem's like /usr and /opt are not mounted until the beginning of runlevel-1 so these would not be available until that transition.
The startup scripts in /sbin/init.d should specify ONLY '/sbin/sh' as their shell interpreter.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2001 11:33 AM
03-11-2001 11:33 AM
Re: bad shell error and can't get into multiuser mode
I'm usually not working on Sunday but we got hit hard with a virus...our email server went down and now the unix is down too!!
OK, so back to the problem.....the unix machine boots into single user mode after the error message....but how can I change that file? I try to use vi to get to that file but it doesn't see the editor.
How can I get to that passwd file to change it?
thanks again!
Oskar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2001 01:04 PM
03-11-2001 01:04 PM
Re: bad shell error and can't get into multiuser mode
when you are in single user mode only / is mounted. That's why you cannot use vi etc.
To correct this situation do the following:
vgchange -a y vg00 # activate vg00
mount -a # mount all
vi /etc/passwd
reboot
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2001 01:41 PM
03-11-2001 01:41 PM
Re: bad shell error and can't get into multiuser mode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 03:42 AM
03-12-2001 03:42 AM
Re: bad shell error and can't get into multiuser mode
So far I've never had any problems for no using /sbin/sh but I would appreciate if anyone can contrive a scenario where using /usr/bin/ksh instead of /sbin/sh may have an adverse effect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 06:38 AM
03-12-2001 06:38 AM
Re: bad shell error and can't get into multiuser mode
I thought root could have full access to all files?
How can I get to read that file with full access?
I really appreciate the help, I'm new at this stuff......I've read the book and stuff but no real-life experience! This wasn't in the book!!!
Oskar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 06:56 AM
03-12-2001 06:56 AM
Re: bad shell error and can't get into multiuser mode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 06:57 AM
03-12-2001 06:57 AM
Re: bad shell error and can't get into multiuser mode
only / /stand and swap are active fs.
In maintenance mode / /stand swap also
so no /usr and you have problems getting into
single user mode.
I'll have a look to the q and get back.
Use vipw in any case to edit the passwd file
by hand althou you can change it with passwd -shell or something like that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 07:02 AM
03-12-2001 07:02 AM
Re: bad shell error and can't get into multiuser mode
Fix it first.
#vipw
edit the root users shell it should be
/sbin/sh
save the file
[Esc]:wq!
make sure it saved
#cat /etc/passwd | grep root
#shutdown -r now
If there is trouble on the reboot
give us the error, you may have more problems
that you haven't seen yet! You will then need
to interact with the boot process and bring the
system up step by step.
Ps: give points too. :?)
Later
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 07:02 AM
03-12-2001 07:02 AM
Re: bad shell error and can't get into multiuser mode
If you have your filesystems mounted as Andreas suggested, then as root you don't need to worry about a file showing readonly permissions.
You can 'vi' [or better 'vipw'] the /etc/passwd file and fix root's default shell. Do a
Another way to change a user's default shell is to use 'chsh', in root's case:
# chsh root /sbin/sh
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 07:03 AM
03-12-2001 07:03 AM
Re: bad shell error and can't get into multiuser mode
to make the change faster an simpler do this:
chsh root /sbin/sh
This will change the login shell for root in /etc/passwd.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 09:17 AM
03-12-2001 09:17 AM
Re: bad shell error and can't get into multiuser mode
I would like to thank all the people who advised me on this issue.
All of you helped us out at a really bad time.
The conclusion to this is as follows:
I made the vendor who changed the shell aware of the problem and also told them the remedy suggested by the HP support site.
They tried using the chsh command but didn't make it the /sbin/sh. they tried a few things....after that didn't work they tried the /bin/sh.
The machine is still down and the vendor says they are taking care of it but I can't help but see that if they did what you guys said the server would be working.
well thank you for your assistance.
oskar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 12:46 PM
03-12-2001 12:46 PM
Re: bad shell error and can't get into multiuser mode
Pretty sad that you the customer had a better chance of fixing it than them!
Call HP for a list of vendors in your area, or if your in Michigan area, drop me an email.
BTW: For Dragon, most people to not use a blob HFS filesystem which would allow you to have /usr/bin/ksh as root's home directory! Most of us want a bit more control of what goes where, and use separated vxfs filesystems to achieve this purpose! It is pretty easy to make a HISTORY entry in the /.profile if this is the concern, or just to type ksh on the command line if this is the shell you like to "work" in! Since root's shell is much more than a shell to "work" in, it should not be changed!
Regards,
Shannon