FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 10-10-2012, 06:42 PM
"James B. Byrne"
 
Default 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
 
Old 10-10-2012, 06:52 PM
 
Default 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
 
Old 10-10-2012, 07:00 PM
John R Pierce
 
Default 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
 

Thread Tools




All times are GMT. The time now is 10:38 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org