If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):
From: "Brian K. White" <brian@aljex.com> References: <103lgk7fpboc995@corp.supernews.com> <20040224034647.GD2434@jpradley.jpr.com> Subject: Re: bash as login shell Date: Tue, 24 Feb 2004 02:01:42 -0500 Message-ID: <ELSdneJ1iI14a6fd4p2dnA@comcast.com> Jean-Pierre Radley wrote: > David P. Lurie typed (on Mon, Feb 23, 2004 at 10:18:53PM -0500): >> 5.0.7 with all update and maintenance packs, security patches >> >> I would like to change the login shell to bash for both root and my >> regular account, but no explicit choice for bash occurs in the drop >> down list on Account Manager. >> >> A test user account was created, "/usr/bash" was entered manually >> for login shell, "add shell environment files to home directory" >> was checked, and the account login seems to proceed normally to a >> functioning bash shell. I had previously invoked bash from a command >> prompt. > > /usr/bash?? Not /usr/bin/bash? > >> The dropdown list of shell choices includes /usr/bash for the new >> user, but not other users after selecting "change login shell" in >> Account manager. I assume that manual entry of "/usr/bash" and >> checking the shell environment option would work for previous users >> as well. >> >> Is this approach likely to cause any problems? > > I'd just go into /usr/lib/mkuser and concoct entries for bash, which > can easily be patterned on those already present for other shells. And add /usr/local/bin/bash to /etc/shells
But I still hold that it's not adviseable to use bash as root's login shell or even as a temporary interactive shell in some cases. I'd say someone in some position of knowledge agrees with me. Witness that even the latest gnutools that include all kinds of nice gnu stuff, still does not include a /usr/gnu/bin/bash. I think it's ok to have it on the system so that odd scripts that just assume all unixes have bash have some chance of running without needing to be hand-edited. On any 5.0.6 or later box, if you just set root's login shell to /bin/ksh in /etc/passwd, (and make sure your VISUAL or EDITOR environment variable is unset or at least not set to "vi") you will find the shell acts enough like bash for most people. You can even back-port this behaviour to earlier boxes by just copying the .kshrc and .profile from a 5.0.6 or later box. (tab-completion won't work on the earlier boxes unfortunately) most programming syntax that anyone actually uses day to day works the same in ksh as bash, and the .kshrc & .profile provides most of the same interactive candy (up/down arrows browse command history, left/right arrows allow command editing, tab-completion, etc...) There are a couple things that might get used a lot by some prople that don't work. Ctrl-V is an example. Unless you have a very specific and non-trivial reason to use bash, I do not recommend making root's shell bash. The system has been using sh and ksh for 20 years and their behaviour has not changed much the whole time. bash is pretty close but not the same and while most scripts have been updated over the last year or two (or three) so that they specify a shell at the top rather than trusting the the current interactive shell or roots defined login shell is the same /bin/sh it always was, it's still just plain not a safe assumption that throwing in this deviant element into the works will not cause any problem, anywhere, ever. If bash shows up in a stock install, or at least in gnutools, and in /etc/shells (without putting it there myself), and in mkuser/bash THEN I'll consider it OK, and when (not if) things break, I'll complain to SCO.
You really shouldn't even use ksh as roots /etc/passwd login shell, but at least that's extremely well tested by now. -- Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/ +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani
/Bofcusm/2440.html copyright 1997-2004 (various authors) All Rights Reserved
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar