- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- root's shell
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
07-30-2002 01:11 PM
07-30-2002 01:11 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2002 01:15 PM
07-30-2002 01:15 PM
Re: root's shell
You must use the /sbin/sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2002 01:17 PM
07-30-2002 01:17 PM
SolutionAFTER boot you can change it to whatever you please. But it MUST be /sbin/sh in the /etc/passwd entry for root for the reason you pointed out, /usr is not mounted in single-user mode as well link lib issues. The system will refuse to boot if root's entry in the passwd file is anything other than /sbin/sh.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2002 01:17 PM
07-30-2002 01:17 PM
Re: root's shell
http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000058669638
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2002 02:06 PM
07-30-2002 02:06 PM
Re: root's shell
And second, you must have a statically linked version of the shell so that you have a shell when only / is mounted. Having said this, it would be really dumb not to use /sbin/sh (the statically linked version of the POSIX shell).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2002 02:31 PM
07-30-2002 02:31 PM
Re: root's shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2002 03:05 PM
07-30-2002 03:05 PM
Re: root's shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2002 03:22 PM
07-30-2002 03:22 PM
Re: root's shell
HP's POSIX shell is actually a superset of ksh, with features such as ulimit -a which is not available in ksh. Most users don't want sh as a shell because it (unfortunately) looks like a Bourne shell, which significantly limited compared to POSIX shells. For the average shell user and script writer, the two shells are virtually identical.
One difference that's easy to configure is filename completion and command stack recall. For ksh, the default location is $HOME/.sh_history, but for HP's POSIX shell, there is no default for root so it must be explicitly defined. Since this definition is exactly the same env variable for the POSIX shell, ksh and even bash, the change is easy. Add this to /etc/profile:
export HISTFILE=$HOME/.sh_history
and now all your favorite ksh command stack and and filename completion features will work.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 06:18 AM
07-31-2002 06:18 AM
Re: root's shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 08:49 AM
07-31-2002 08:49 AM
Re: root's shell
REAL=`logname`
HISTFILE=.sh_$REAL
HISTSIZE=1000
export HISTFILE HISTSIZE
That way the history file is no longer .sh_history but now there is one history file for each person that su-es to root that looks like .sh_john and .sh_bill etc. By the way the HISTSIZE is number of commands retained, you may want to modify this or eliminate HISTSIZE and take the default.