Re: swith user to a bash user
Nicola Lodato <[email protected]> Thu, 09 Oct 2003 11:31:29 +0200
| Newsgroups | gmane.comp.gnu.sh-utils.bugs |
|---|---|
| Message-ID | <[email protected]> |
When user test has bash shell, then
#su - test -c 'echo $ODSRELEASE'
and
#su - test -c "echo \$ODSRELEASE"
don't return any value.
If I turn the shell to ksh, then:
#su - test -c 'echo $ODSRELEASE'
return:
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
/some/dir/
then it appears that the .profile is not read.
PS: the version of the bash is 2.05
Thanks
Nicola Lodato
Nicola Lodato wrote:
> Hi,
>
> I've a user /test /that has a /bin/bash shell. In his .profile file
> there is these lines:
> ODSRELEASE=/some/dir/
> export ODSRELEASE
>
> When, as user root, I try this command:
>
> su - test -c "echo $ODSRELEASE"
>
> this command don't return any value.
> I've also pasted these lines in .bashrc and .bash_profile but the
> result is the same.
> I think that the profile of a user that has a bash shell isn't loaded.
>
> Nicola Lodato
>