Ask a Question related to Linux / Unix Administration, Design and Development.

  1. #1

    Default Re: "No Shell"

    "Michael Vilain <vilain@spamcop.net>" wrote:
    > Just as an aside, if you change HP/UX's root shell to anything other
    > than what HP set it to (I vaguely recall setting it to /sbin/ksh rather
    > than their braindead non-POSIX /sbin/sh), the system wouldn't shutdown.
    > The shutdown command said to change the shell back to /sbin/sh, then run
    > shutdown again. I did this on 10.20 some years ago and don't know about
    > 11.
    I thought both HP-UX 10.20 and 11 used a POSIX sh. Trying to find the
    Bourne shell on HP-UX is always fun (sigh).

    I would have loved to switch our HP-UX systems to /bin/ksh but I didn't
    know enough about the system to do such with impunity - I've heard
    enough times the horror stories about not being able to log in and so
    forth. When I start wanting more, I always just use the command
    "/bin/ksh" and then continue on...

    Linux is another matter - I know enough about Linux that I routinely
    switch all root accounts to /bin/ksh. Only time it matters is if any of
    the startup scripts use a "bash-ism" and don't remember to start their
    script with "#!/bin/sh" ...

    FreeBSD is yet another matter - I don't know if I could switch root's
    shell without problems (their default is /bin/csh) but I don't have to.
    There is a user "toor" which is also uid 0 included in FreeBSD for
    just such a purpose - change the shell (for "toor" that is) all you
    want, that's why "toor" is there.
    David Douthitt Guest

  2. Similar Questions and Discussions

    1. CPAN shell says "Out of memory!"
      I'm trying to use the CPAN shell to do installation of some modules on a web hosting account. It is not, however, going quite as smoothly as I...
    2. server.createObject("wscript.shell") ... wShell.run ... stopped working...
      I used to be able to run the following ASP code on our corp machine (W2K Server Edition and IIS-5) and successfully send a net-msg to anyone on our...
    3. what's the difference between ". cmd" and "cmd" in shell script??
      Thank u very much!! -- Zhao YouBing, Ph.D student State Key Lab of CAD&CG,Zhejiang University, Hangzhou, 310027, P.R.China Tel :...
    4. server.createobject("wscript.shell")
      How about: set wshell = server.createobject("wscript.shell") wshell.run "c:\file.bat " & x set wshell = nothing And then in your batch, use...
    5. Error:: Activex componet can not create object:"WScript.Shell"
      I am trying to use the shell object to send keys to the explorer browser to run the send page funcion. I am receiving the above error only when I...
  3. #2

    Default Re: "No Shell"

    On 2004-05-19, David Douthitt <ddouthitt@cuna.coop> wrote:
    > Linux is another matter - I know enough about Linux that I routinely
    > switch all root accounts to /bin/ksh. Only time it matters is if any of
    > the startup scripts use a "bash-ism" and don't remember to start their
    > script with "#!/bin/sh" ...
    Which in itself is bad enough.


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    jpd Guest

  4. #3

    Default Re: "No Shell"

    In article <c8g42b$jmv$1@grandcanyon.binc.net>, David Douthitt wrote:
    > "Michael Vilain <vilain@spamcop.net>" wrote:
    >
    >> Just as an aside, if you change HP/UX's root shell to anything other
    >> than what HP set it to (I vaguely recall setting it to /sbin/ksh rather
    >> than their braindead non-POSIX /sbin/sh), the system wouldn't shutdown.
    >> The shutdown command said to change the shell back to /sbin/sh, then run
    >> shutdown again. I did this on 10.20 some years ago and don't know about
    >> 11.
    >
    > I thought both HP-UX 10.20 and 11 used a POSIX sh. Trying to find the
    > Bourne shell on HP-UX is always fun (sigh).
    They do - /sbin/sh is a POSIX sh, /usr/old/bin/sh is Bourne. And HP's /sbin/sh
    shares the codebase with /usr/bin/ksh :

    $ strings /sbin/sh | grep -i ksh
    ksh: Cannot reset line disciplines
    ksh: Cannot set line disciplines
    ksh: sysconf error
    ksh: no memory

    And I can't think of anything offhand that can be done with ksh as a user shell
    and not be done exactly the same way with /sbin/sh on HP-UX...
    >
    > I would have loved to switch our HP-UX systems to /bin/ksh but I didn't
    > know enough about the system to do such with impunity - I've heard
    > enough times the horror stories about not being able to log in and so
    > forth. When I start wanting more, I always just use the command
    > "/bin/ksh" and then continue on...
    It only matters during a system recovery where your filesystems may not be
    mounted or your shared libraries are for some reason not accessible. Since
    /usr/bin/ksh uses shared libs, it will not work. All executables in /sbin do
    not required shared libs, so /sbin/sh is THE shell to use for root.
    >
    > Linux is another matter - I know enough about Linux that I routinely
    > switch all root accounts to /bin/ksh. Only time it matters is if any of
    > the startup scripts use a "bash-ism" and don't remember to start their
    > script with "#!/bin/sh" ...
    >
    Since ksh (assuming you mean pdksh) follows the same convention of using shared
    libraries under /lib, which should be on th "/" filesystem, that seems pretty
    safe.

    Out of curiousity, why do you prefer ksh over bash as a user shell? I
    personally use ksh as a user shell, but use /bin/bash for root.
    > FreeBSD is yet another matter - I don't know if I could switch root's
    > shell without problems (their default is /bin/csh) but I don't have to.
    > There is a user "toor" which is also uid 0 included in FreeBSD for
    > just such a purpose - change the shell (for "toor" that is) all you
    > want, that's why "toor" is there.
    Kevin
    Kevin Collins Guest

  5. #4

    Default Re: "No Shell"

    Kevin Collins wrote:
    > Out of curiousity, why do you prefer ksh over bash as a user shell? I
    > personally use ksh as a user shell, but use /bin/bash for root.
    Several reasons:

    * Standard: There are no extensions to trip over when I take a Linux ksh
    script into a HP-UX or Unixware environment... ksh is standard.

    * Clean vi-editing support - everytime I enable vi command history
    editing, I find out immediately if I'm in bash or not. Bash gives nasty
    prompts and in general acts funny.

    * Minimalist: pdksh (or ash, by the way) support nearly everything from
    ksh and are much smaller than bash.

    * Familiarization: this is personal, and somewhat professional, but I
    was programming in ksh (and using csh) before bash came along. I
    finally switched to ksh when I started work here as ksh was the standard
    shell already and I wanted to learn it (I could have used csh).
    David Douthitt Guest

  6. #5

    Default Re: "No Shell"

    In article <c8gm54$o8m$1@grandcanyon.binc.net>, David Douthitt wrote:
    > Kevin Collins wrote:
    >
    >> Out of curiousity, why do you prefer ksh over bash as a user shell? I
    >> personally use ksh as a user shell, but use /bin/bash for root.
    >
    > Several reasons:
    >
    > * Standard: There are no extensions to trip over when I take a Linux ksh
    > script into a HP-UX or Unixware environment... ksh is standard.
    While I generally agree with that, there are differences and incompatibilities
    between pure ksh88 and pdksh. The folks who post to this group who are
    "portability oriented" would probably disagree more strongly.
    > * Clean vi-editing support - everytime I enable vi command history
    > editing, I find out immediately if I'm in bash or not. Bash gives nasty
    > prompts and in general acts funny.
    >
    > * Minimalist: pdksh (or ash, by the way) support nearly everything from
    > ksh and are much smaller than bash.
    >
    > * Familiarization: this is personal, and somewhat professional, but I
    > was programming in ksh (and using csh) before bash came along. I
    > finally switched to ksh when I started work here as ksh was the standard
    > shell already and I wanted to learn it (I could have used csh).
    Thanks, all valid reasons and ones I mostly share :)

    Kevin
    Kevin Collins Guest

  7. #6

    Default Re: "No Shell"

    In article <c8g42b$jmv$1@grandcanyon.binc.net>,
    David Douthitt <ddouthitt@cuna.coop> wrote:
    >"Michael Vilain <vilain@spamcop.net>" wrote:
    >
    >> Just as an aside, if you change HP/UX's root shell to anything other
    >> than what HP set it to (I vaguely recall setting it to /sbin/ksh rather
    >> than their braindead non-POSIX /sbin/sh), the system wouldn't shutdown.
    >> The shutdown command said to change the shell back to /sbin/sh, then run
    >> shutdown again. I did this on 10.20 some years ago and don't know about
    >> 11.
    >
    >I thought both HP-UX 10.20 and 11 used a POSIX sh. Trying to find the
    >Bourne shell on HP-UX is always fun (sigh).
    >I would have loved to switch our HP-UX systems to /bin/ksh but I didn't
    >know enough about the system to do such with impunity - I've heard
    >enough times the horror stories about not being able to log in and so
    >forth. When I start wanting more, I always just use the command
    >"/bin/ksh" and then continue on...
    >Linux is another matter - I know enough about Linux that I
    >routinely switch all root accounts to /bin/ksh. Only time it
    >matters is if any of the startup scripts use a "bash-ism" and
    >don't remember to start their script with "#!/bin/sh" ...
    >FreeBSD is yet another matter - I don't know if I could switch
    >root's shell without problems (their default is /bin/csh) but
    >I don't have to. There is a user "toor" which is also uid 0
    >included in FreeBSD for just such a purpose - change the shell
    >(for "toor" that is) all you want, that's why "toor" is there.
    I've been using /bin/ksh for the root shell on FreeBSD for at least
    6 years now. The real ksh, not pdksh.

    As to the 'toor' account it is not there to use as an alternate
    shell, it's there as a safety net. The default shell for toor is
    /bin/sh. The 'toor' entry doesn't even have a shell specified
    so you get the default /bin/sh. It's the smallest of all shells
    on FreeBSD - at 400K - but all the FreeBSD shells, and all of
    /bin for that matter, is statically linked [with the exception of
    rmail].

    The default root shell on FreeBSD - though called csh is not
    the standard csh, but is hard-linked to /bin/tcsh an ehanced
    csh.

    I'd advise leaving toor completely alone.



    --
    Bill Vermillion - bv @ wjv . com
    Bill Vermillion Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139