- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Feedback using bash shell for root
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
04-07-2006 03:35 AM
04-07-2006 03:35 AM
Feedback using bash shell for root
bourne shell is hpux default and if troubles happen, /sbin/sh has no dependancies. bash has dependency on few libraries under a different file system /usr/lib but I mirror all the OS file systems which covers this point. Does anybody sees any concern or negative outcome when changing the root shell to bash? I certainly appreciate any feedback.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2006 03:46 AM
04-07-2006 03:46 AM
Re: Feedback using bash shell for root
NO, don't change the default root shell!
Root's default shell must be the statically linked Posix shell found in '/sbin/sh'. In this fashion, everything is available even before shells in '/usr' with dynamic libraries are available when '/usr' is finally mounted.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2006 03:47 AM
04-07-2006 03:47 AM
Re: Feedback using bash shell for root
If you do that you will almost certainly break things, and it is possible that the machine may have problems booting.
There are lots of things that are very dependent on the '/sbin/sh' for root.
You are actually incorrect in saying that the bourne shell is the default. the 'sh' shell in HP-UX is the POSIX shell.
Also, if you change the default in /etc/passwd, you may not be able to effectively use single-user mode. When booting to single-user mode, you do NOT have any file systems mounted, other than '/', so you would NOT have any of the dependencies for bash. That's the purpose of '/sbin/' executables. They are all statically linked, so they don't require any additional libraries from /usr/lib or anywhere else.
My recommendation: DO NOT CHANGE ANYTHING. ESPECIALLY DO NOT CHANGE /etc/passwd. Learn the POSIX shell. Do a 'man sh-posix' and read up on the shell. You'll probably find you can do as much with POSIX as with bash.
If you must use bash, login as root and then do an 'exec bash' to start the bash shell for that particular session.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2006 03:54 AM
04-07-2006 03:54 AM
Re: Feedback using bash shell for root
You will most likely have booting trouble. You will need to boot into single user to fix the /etc/passwd entry and change it back to /bin/sh
If you want root to have bash, put it root .profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2006 03:56 AM
04-07-2006 03:56 AM
Re: Feedback using bash shell for root
DO NOT CHANGE ROOT'S SHELL!!!!!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2006 03:59 AM
04-07-2006 03:59 AM
Re: Feedback using bash shell for root
I really would NOT change the shell for root.
But you can setup an environment for 'bash' (or any other shell like tcsh as we have on solaris).
Check the conditions and if positive, start your customized shell (prob. via exec) in ~root/.profile:
...
case $- in
*i*) [ -x /usr/bin/bash ] && exec /usr/bin/bash ;;
esac
...
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2006 04:02 AM
04-07-2006 04:02 AM
Re: Feedback using bash shell for root
My typo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2006 04:13 AM
04-07-2006 04:13 AM
Re: Feedback using bash shell for root
The major problem is that any rc scripts which must execute before /usr is mounted are dogmeat without a statically linked shell.
Moreover, I am not a big fan of bash:
try this:
echo "one two three" | read A B C
echo "A = ${A}"
echo "B = ${B}"
echo "C = ${C}"
On most versions of bash this is a showstopper because it is such a useful construct that works perfectly under ksh or the POSIX shell.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2006 04:15 AM
04-07-2006 04:15 AM
Re: Feedback using bash shell for root
However, since 11.00, you will get a very specific error message at boot up if you try this:
init: warning: bad shell for root
or sometimes:
"No Shell".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2006 08:56 AM
04-07-2006 08:56 AM
Re: Feedback using bash shell for root
It is very difficult to locate the Bourne shell (/usr/old/bin/sh). Try using the HP POSIX shell and you may never go back to bash. And of course, if you want bash because root is constantly being used in this system, the question is: why? root is for system maintenance, not for general usage. Your system be much more stable if you limit root access.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2006 04:09 PM
04-09-2006 04:09 PM
Re: Feedback using bash shell for root
I donâ t expect to be able to boot at all in single-user if bash is the default shell since several libraries will be missing.
What I am thinking to do is: 1) Leave the /etc/passwd default shell as POSIX. 2) Add a line at the â endâ of the root profile that will execute bash.
This way, in the normal login the root will be switching to bash. In single-user mode, I expect to be able to boot but get an error on â exec bashâ line and then keep working with the statically linked POSIX.
The reason for using bash is to accommodate the other admins who use bash especially in Linux and may have to work on HPUX in an emergency situation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 04:37 AM
04-10-2006 04:37 AM
Re: Feedback using bash shell for root
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2006 04:45 AM
04-10-2006 04:45 AM
Re: Feedback using bash shell for root
;-)
So I would not change the default.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
