Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   Setting PS1 for ordinary users (http://www.linux-archive.org/centos/711281-setting-ps1-ordinary-users.html)

"James B. Byrne" 10-10-2012 06:42 PM

Setting PS1 for ordinary users
 
CentOS-6

When I login as root I see this prompt:


[root@vhost04 ~]#

When I login as a non-priviledged user I see this instead:

sh-4.1$

.bashrc and .bash_profile have identical contents in /root and
/home/user. What causes the difference? Why? How does one change
the default so that all normal users get a [userid@hostname pwd]$
prompt?

I have loked in/etc/profile.d and /etc/bashrc and I cannot see what
condition is triggering the different behaviour.



--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3

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

10-10-2012 06:52 PM

Setting PS1 for ordinary users
 
James B. Byrne wrote:
> CentOS-6
>
> When I login as root I see this prompt:
>
> [root@vhost04 ~]#
>
> When I login as a non-priviledged user I see this instead:
>
> sh-4.1$
>
> .bashrc and .bash_profile have identical contents in /root and
> /home/user. What causes the difference? Why? How does one change
> the default so that all normal users get a [userid@hostname pwd]$
> prompt?
>
> I have loked in/etc/profile.d and /etc/bashrc and I cannot see what
> condition is triggering the different behaviour.

I'd guess whether there's a ~/.bashrc. I've got mine set the way I want
it; I don't remember a ~/.bashrc being automagically created for new
users.

mark

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

John R Pierce 10-10-2012 07:00 PM

Setting PS1 for ordinary users
 
On 10/10/12 11:42 AM, James B. Byrne wrote:
> When I login as root I see this prompt:
>
>
> [root@vhost04 ~]#
>
> When I login as a non-priviledged user I see this instead:
>
> sh-4.1$
>
> .bashrc and .bash_profile have identical contents in /root and
> /home/user. What causes the difference? Why? How does one change
> the default so that all normal users get a [userid@hostname pwd]$
> prompt?
>
> I have loked in/etc/profile.d and /etc/bashrc and I cannot see what
> condition is triggering the different behaviour.

what shell are your regular users configured for? sh reads .profile
rather than .bash_profile

if you want that to be a system-wide default, you can put it in
/etc/profile which ALL shells read before they read any user stuff.



--
john r pierce N 37, W 122
santa cruz ca mid-left coast

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


All times are GMT. The time now is 07:51 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.