- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Changing Borne shell to Korn 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
05-18-2003 05:37 PM
05-18-2003 05:37 PM
I have a problem which really surprises me ...
Pls see below:
a.) I used "SAM" to modify root from borne shell to korn shell and then rebooted the machine .
It then end ups only in single user mode and in addition prompting me that /etc/passwd file is needs to be corrected and that i am using BAD shell .
After reverting back from Korn shell to Borne shell for root
user , the same errors are prompted by the system
/etc/passwd & Bad Shell
All that i had to do was to type init 3 ( Hpux 11.0 OS)
or init 4 ( Hpux 10.20 OS)
to go to the higher run-levels
Any advice or rectification on this problem is really appreciated .
thanks in advance .
omari
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2003 05:55 PM
05-18-2003 05:55 PM
SolutionAnyway, the root user ABSOLUTELY POSITIVELY MUST use /sbin/sh as its default shell. If you use anything else, you will have problems, as you have already seen. Execute vipw to edit the passwd file and make sure that root has /sbin/sh and not something else as its default shell. Anything from /usr/bin/ will not work. It must be /sbin/sh.
If you really want to use another shell when you login as root, exec the shell manually after you log in. Just do a /usr/bin/ksh or whatever shell you want from the # prompt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2003 06:01 PM
05-18-2003 06:01 PM
Re: Changing Borne shell to Korn Shell
One lesson to be learned from this, never change settings for 'root' unless you know for certain that it will not break anything.
If you need to set up additonal environment variables use an additional file to do so after logging in. Even for my own login I use a file like this that I run to do certain functions like looking at certain databases or from certain machines where I want a particular DISPLAY etc.
Regards
Michael
"When I have trouble spelling, it's called fat finger syndrome"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2003 06:10 PM
05-18-2003 06:10 PM
Re: Changing Borne shell to Korn Shell
Many thanks for the help .
Really appreciate the support
from u guys !
rgds,
omari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2003 12:29 AM
05-19-2003 12:29 AM
Re: Changing Borne shell to Korn Shell
It was a mistake for HP to name the POSIX shell sh since it looks exactly the same as the Bourne shell (sh). If you really want the Bourne shell, it is hidden in /usr/old/bin/sh. There are other POSIX shells such as bash that are essentially the same from a user and scripting point of view.
As mentioned, /sbin/sh (not /usr/bin/sh) must always be used for root's shell due to archived libraries. Because of potential issues in single user mode, it is not a good idea to every change the vendor's default root shell.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2003 02:50 AM
05-19-2003 02:50 AM
Re: Changing Borne shell to Korn Shell
I know what Bill meant, but it was/is *no* "mistake for HP to name the
POSIX shell sh". The POSIX standard *requires* it to be named sh. From
the (HP-UX) sh(1) manual page:
> The POSIX.2 standard requires that, on a POSIX-compliant system,
> executing the command sh activates the POSIX shell