Re: Setting PS1 for ordinary users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



James B. Byrne wrote:
> On: Wed Oct 10 15:58:43 EDT 2012 Bowie Bailey Bowie_Bailey at BUC.com
> wrote:
>> It doesn't matter where sh is pointing.  What matters is the
>> shell configuration.
>>
>> I'm using bash here:
<snip>
>> So try 'echo $SHELL' instead of 'which sh' to see which shell
>> you are using.
>
> That seems to be the issue here.
>
> [root@vhost04 ~]# echo $SHELL
> /bin/bash
>
> sh-4.1$ echo $shell
>
> Examining the passwd file as suggested shows that root has :/bin/bash
> and ordinary users have /bin/sh. And yet, the difference in behaviour
> seems strange:
<snip>
> As far as I can see the two invocations call the same program.  And
> yet, replacing /bin/sh with /bin/bash in the ordinary user's passwd
> entry does indeed change the prompt to one identical to that used by
> root.  Does anyone here know why this happens?

This is *very* odd, that users are created using sh, which is supposed to
resemble the original Bourne shell. It has far fewer capabilities than any
of the later shells, and I have no idea why you'd want users screwing with
that. It's very much *not* used much any more....

I'd change all users in /etc/password to bash, unless they've explicitly
requested something else - (t)csh, or zed, whatever.

      mark
      mark

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux