- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Bash on HPUX 11i
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-30-2002 04:47 AM
04-30-2002 04:47 AM
I have a small problem.
I have installed the Bash 2.04 depot on my hpux 11i, and the installation went fine with no errors, but I can't seem to "chsh" to the new shell.
The reply from ux11i is, that the shell is invalid.
Anyone have an idea what's wrong ?
Sorry to say, but i'm new to UX11i.
Thanks in advance
J??nne
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2002 04:57 AM
04-30-2002 04:57 AM
Re: Bash on HPUX 11i
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2002 04:59 AM
04-30-2002 04:59 AM
Re: Bash on HPUX 11i
Dave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2002 05:07 AM
04-30-2002 05:07 AM
Re: Bash on HPUX 11i
There is no /etc/shells file !!
Can I make one myself or.....??
And what path ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2002 05:13 AM
04-30-2002 05:13 AM
Re: Bash on HPUX 11i
#------------------------------------------------------------------------
/bin/sh
/bin/csh
/bin/ksh
/bin/rksh
/bin/rsh
/bin/pam
/bin/false
/sbin/sh
/usr/bin/ksh
/usr/bin/sh
/usr/local/bin/bash
#------------------------------- End shells -----------------------------
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2002 05:13 AM
04-30-2002 05:13 AM
Re: Bash on HPUX 11i
See man shells :-
/etc/shells is an ASCII file containing a list of legal shells on the system. Each shell is listed in the file by its absolute path name.
Lines or portions of lines beginning with # are assumed to be comments and are ignored. Blank lines are also ignored.
HTH
Dave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2002 09:06 AM
04-30-2002 09:06 AM
Re: Bash on HPUX 11i
just be careful NOT to use that shell for user "root"!
The reason is that it needs to be stored in the root-filesystem AND to be linked *statically* to be permitted for "root"!
Usually shells are linked dynamically and stored below "/usr" or "/opt" and hence NOT available at boot-time!
Just a reminder,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2002 12:12 AM
05-02-2002 12:12 AM
Re: Bash on HPUX 11i
Thanks to you all, your replies did help me, and I will be given you point this day !
Unfortunately the reply from Wodisch came about 1 hour too late, I had already changed the shell for Root.
Now - How do I get back ? I can't login neither on console or anything anymore !
I have tried to boot in single mode, that won't help either !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2002 01:51 AM
05-02-2002 01:51 AM
Re: Bash on HPUX 11i
DO you have remsh access from any of other servers in your network. I mean if you have setup .rhosts and hosts.equiv.
then logon as root to the other server from where you have access and type
# remsh server_name "cp /etc/passwd /etc/passwd.back"
# remsh server "echo "root::0:3::/users/root:/usr/bin/ksh" >/etc/passwd"
now you can try login in.
(::) Another guess
Try ftping the /etc/passwd file.
--Niraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2002 02:04 AM
05-02-2002 02:04 AM
Re: Bash on HPUX 11i
You need to use /sbin/sh as it's part of root!
HTH
Dave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2002 04:32 AM
05-02-2002 04:32 AM
Re: Bash on HPUX 11i
If you do not have remsh access:
You can boot off the support CD (if you have it) and use ed -- although ed is a bit confusing to a newbie.
Otherwise (on support CD), as stated above, copy /etc/passwd to /etc/passwd.bak. more the /etc/passwd file and count how many lines there are under root, then do the echo "root::0:3::/:/sbin/sh" >/etc/passwd, which will OVERWRITE the contents with just that line.
After you have done this, then tail -n (number of lines under roots entry in /etc/passwd.bak)/etc/passwd.bak >> /etc/passwd, for example if your /etc/passwd file is 23 lines long, and there are 22 entries OTHER THAN root, then the command would be:
tail -n 22 /etc/passwd.bak >>/etc/passwd
Please make sure you use /sbin/sh for the shell.
MND
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2002 07:31 PM
05-02-2002 07:31 PM
Re: Bash on HPUX 11i
I thingk there is no problem in using ">" as my first
cp command will make a copy of the password file.
Now if you use ">>" append then there will be two entres of root login. Instead of that
you can have any other login name with UID=0,
I hope that will do.
-Niraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2002 03:52 AM
05-03-2002 03:52 AM
Re: Bash on HPUX 11i
As with all flavors of Unix, root should be left in it's default state and never used as a general login, just used for system maintenance. If you really want ksh or bash, you can type that command after you login. However, most users that want bash are looking for the command recall capability found in POSIX shells. So rather than change shells, just enable it in /etc/profile:
export HISTFILE=$HOME/.sh_history
This sets up the shell history for all users running POSIX shells like ksh, bash and HP's /usr/bin/sh.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2002 05:27 AM
05-06-2002 05:27 AM
Re: Bash on HPUX 11i
I am sorry to keep bothering all you masters, but as I implied in my first message, i'm new to HPUX.
I can't seem to get the bash working, regardless of which user I assign the new shell to. I have tried to edit /etc/passwd with SAM and vi, but nothing works.
When I do a su
If I switch back to /sbin/sh (POSIX) and then do a su
still tells me that the shell is /sbin/sh.
My /etc/shells file contains 2 shells:
*--------------------------
/sbin/sh
/usr/local/bin/bash
*--------------------------
Which group should default user be a member of ? Or does this not make any difference ?
The bash file looks like this with command
ls -l:
-rwxr-xr-x 1 bin bin 4235780 May 23 2001 bash
I have tried to use Bills reply about history, that won't work either.
By now I don't now what to do anymore !!!
thanks,
J??nne
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2002 05:42 AM
05-06-2002 05:42 AM
Re: Bash on HPUX 11i
Make sure of several things:
First, /etc/shells should not only contain the full name to the 'bash' shell, but all of the standard shells:
/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/keysh
/usr/local/bin/bash # <--- your addition
Next, make sure that you have provided read and execute permissions to the directory and subdirectories in the path '/usr/local/bin'.
BTW, remove the write permission from the 'bash' executable -- you don't need it!
Make sure that you specify the absolute name of the shell in '/etc/passwd'. If you have used '/usr/local/bin/bash', make sure that that is specified in /etc/passwd for the appropriate user (but, NEVER root, as you have learned).
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2002 06:19 AM
05-06-2002 06:19 AM
SolutionThe reason (lost in the strangeness of Xwindows) is that dtterm (and Xterm and HPTERM windows do not login normally--they bypass *all* of the startup profiles. To get 'normal' Unix behavior, create a file in your $HOME directory called: $HOME/Xdefaults
and put these lines in it:
echo "*loginShell: true" >> $HOME/.Xdefaults
I specifically used >> to append to your current .Xdefaults file (but likely there isn't one). This file is sort of like .profile only for Xwindows. What it does is to set certain Xwindow default values. For example, the contents might look like this:
*loginShell: true
HPterm*scrollBar: true
HPterm*saveLines: 10s
HPterm*background: navy
HPterm*foreground: white
Xterm*background: darkslateblue
Xterm*foreground: white
Xterm*saveLines: 10s
Xterm*scrollBar: true
Dtterm*saveLines: 10s
Dtterm*scrollBar: true
and after adding these lines to .Xdefaults, all hpterm, xterm and dtterm windows will have a scroll bar plus 10 screens (800 lines) of history. hpterm will have a dark blue with white letter color scheme while xterm will have a more gray-blue background with white letters. dtterm will match the overall CDE color scheme. Be sure you logout completely from CDE and login again. Now, when you start a terminal window, it should show the copyright message and other things in /etc/profile.
Use the command:
echo $HISTFILE
to see that /etc/profile was executed.
Another check:
find /usr/local -type d -exec ls -l {} \;
This should show all directories as 755 or drwxr-xr-x (and not 777 or drwxrwxrwx). If the directories are wrong, fix them immediately as the /usr/local directories can be corrupted or removed by any user.
Also check that the command:
/usr/local/bin/bash
actually starts bash. Verify that bash is in your $PATH with the command:
type bash
(/etc/PATH usually has /usr/local/bin left out of $PATH because of the bad permissions found in standard installs)
Once HISTFILE gets set when you login, the command line history will start working for /sbin/sh (and bash too).
Bill Hassell, sysadmin
- Tags:
- .Xdefaults
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2002 01:21 AM
05-07-2002 01:21 AM
Re: Bash on HPUX 11i
So I got the history working (If only with ESC h,j,k,l keys), but it works - thanks Bill.
But my bash is still not working. It is in the $PATH, where it should be.
When I run /usr/local/bin/bash, it replies with "execute permission denied". WHY ??
An ll on /usr/local/bin looks like this:
-r-xr-xr-x 1 bin bin 4235780 May 23 2001 bash
-r-xr-xr-x 1 bin bin 4907 May 23 2001 bashbug
so what can be wrong ?
I can assign it to a user,but when I do a su
ps. I am running on a HP9000 server but using Exceed to communicate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2002 02:32 PM
08-22-2002 02:32 PM
Re: Bash on HPUX 11i
I have the bash shell installed and /etc/shells is correct. The bash shell was installed to '/usr/local/bin'. When I attempt to execute the shell directly (/usr/local/bin/bash) I get the error "/sbin/sh: /usr/local/bin/bash: Execute permission denied." permissions on bash have been changed to 777 with no luck. Permissions on the directory path to, and including, bin, are all set to 777
After changing a test user to utilize /usr/local/bin/bash as it's shell, issuing 'su
I checked all previous recommendations in this thread including permissions, as mentioned above, with no luck.
I have tested this using Reflection X and the default windows 2000 "telnet" character-based utility with the same results.
Any help or additional recommendations would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2002 08:48 AM
08-27-2002 08:48 AM
Re: Bash on HPUX 11i
Unfortunately, I was only able to find refernece to these in messages here on ITRC and in the install readme files that are part of the source download.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2002 02:33 PM
12-12-2002 02:33 PM
Re: Bash on HPUX 11i
I have HPUXBase64 B.11.11 with BUNDLE11i B.11.11.0102.2
I have read the entire thread and still have not been able to get bash to work.
I have it added to my /etc/shells file, and working with the current versions of
bash 2.05b
libiconv 1.8
gettext 0.11.5
readline 4.1.2001-06-12
I still get the following error "sh: bash: Execute permission denied. "
Please help me with this.
Joe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2005 03:08 AM
11-29-2005 03:08 AM
Re: Bash on HPUX 11i
Mike