On Fri, May 17, 2002 at 07:56:20PM +0530, Logu wrote:
> 
> We have built linux from scratch. I am not getting the customised 
> prompt when i login as a user.  But if I again switch to the same 
> user i am getting it.
> 
> For ex. I have logged in as user logu, now the prompt is
> sh-2.05a$
> 
> If I switch to the user again with the command 'su - logu', then 
> the expected prompt comes.
> logu:~$
> how do i rectify this. 
[snipped]

Entry in .bash_profile is adequate to get PS1 output under bash.
In your case you are getting correct output after a su login but
failing at the login prompt.

My assessment is that you may have  entered the default shell of
logu as /bin/sh and not /bin/bash. PATH, HOME &  SHELL variables
cannot be set from the command line, and  should be  entered  at 
the time the user is created, and placed in /etc/passwd.

Quoting from the man pages of login: 
<snip>
    Not all variables may be set in the fashion, notably PATH, 
    HOME and SHELL.  Additionally, IFS may be inhibited if the  
    user's login shell is /bin/sh.
</snip>                                          
                                           
This is just a shot in the dark, but may be the cause ... just
re-create user logu with full GECOS entry and retry.

Everything you have done otherwise seems okay.  PS1 is custom-
ised for each individual user, and I don't see any need to set
a system wide PS1 entry in /etc/profile.
 
HTH

Bish

--
:
####[ Linux One Stanza Tip (LOST) ]###########################
  
Sub : Recovering from corrupt LILO on MBR            LOST #259

In case of corrupt LILO at MBR, it is merely a matter of boot-
ing from the boot disk created during installation.  Once into
the system check your /etc/lilo.conf. Then as root run:
#lilo -v
 
####<[EMAIL PROTECTED]>#################################
:

_______________________________________________________________
Hundreds of nodes, one monster rendering program.
Now that's a super model! Visit http://clustering.foundries.sf.net/

_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to