-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[color=blue]
created a file named .bash_profile under the /home/oracle[/color]
I assume, per a command like getent passwd oracle
that /home/oracle is
indeed the user’s home directory. The rest of your steps imply as much,
but this is odd so we’d might as well be thorough. I also assume that
/bin/bash is your login shell. Again, your errors seem to confirm that,
but who knows.
[color=blue]
First, without any line in the file, go to the terminal issue: su -
oracle → successfully switch to the oracle user environment[/color]
Good.
[color=blue]
Now add, ORACLE_BASE=/u01/app/oracle export ORACLE_BASE go back to
the terminal: su - oracle → error: -bash: export : command not
found[/color]
I assume the commands above are on two lines, but I don’t see that here.
Wrapping these types of things in code tags (see the ‘help’ for the
forums for more info) can help with this visibility. Anyway, ‘export’
is a bash builtin so it’s not possible for it to be missing as far as I
know. If bash is running things then bash has this builtin, at least
for all versions of bash since many years ago.
[color=blue]
Worse, if I put these lines in the file: DISPLAY=0.0 export DISPLAY I
can not even log in to the oracle user account.[/color]
Unless I’m mistaken you have a typo when setting DISPLAY. Every time
I’ve done it, or seen it done, the syntax has had a colon that I do not
see in your case:
Code:
DISPLAY=:0.0
export DISPLAY
Also, you’re welcome to combine these for all current versions of bash,
not that it will necessarily help considering your errors:
Code:
export DISPLAY=:0.0
[color=blue]
Similarly, if I put DISPLAY=0.0 export DISPLAY +xhost in the /root I
will not be able to log in as root.[/color]
Same issue as above, plus for ‘xhost’ you should be doing something like
this:
Code:
xhost +
While we’re testing, have you tried putting these commands in the
~/.bashrc file instead of the ~/.bash_profile file? I’ve never used (or
seen used) the latter, but I’ve spent most of my life in areas that used
~/.bashrc which also works nicely. Unlike the profile scripts is an
‘rc’ script and while I’m not an expert on the difference I use this
‘rc’ script for everything in my environment the same way I think you’re
using your profile script. See the ‘bash’ manpage for tons of
information on both types of things.
Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iQIcBAEBAgAGBQJQa6c/AAoJEF+XTK08PnB5qo0QAKt5cz/UWKdGrrZJa51QwLvk
NFSRte3wTSBI+wXEtTMo90UzeRy0wKaiqBcJ7VMdUK0iSyM+YOn3cuMiCD3hyv6x
b0tD+6mxBIIXCvVDz97EPGHgXhj4PaDMUZFm4PSMyNH/fb3qucxm6LOkWx/FVS+Y
SNbAWFrlqeaoSNbA0Bc9FXjcMeVxoQ+lMO19tdSjr4UvwT5GBbwBFhaI9+Ane8Dx
xTIo8A25ahqnb984d3yH1rZPZ6Pmvu/e+AqTd8PRcnfe0UdmPC5r4aNfirjJVGbr
vauRUUgTsyHvpXWgc8MzYUdiVlsxNBTqOXXLvvuQla5L6f+8JEgki3Me9deJ/blO
6vEhGfahYEJDg3+s8C7nk/8NV2GloDDPpYJ3h+K7tPgWlDml86E4LSrOeQuoj1fK
1j2M0UK6x/UIfA1SkI9/5bTMiq1Rss+Xtuq48D7W72r9sOSgaRqwv+VfeLiYHTCg
S4x348emna3BNkPHxTFqPISqdNKf/zy6iEytI7gzlD4CIFQBNmmZqdlLRLLp8yB0
FjDwaGzlRBdFWd7maaJ7dMsZmIrmyrFIgO3Tls5ONnlwFO3+RHygG4N8U9fOPlO1
txHSrdWNF0kIvgqGXRZGQ5XakWPJpWVEyMsj6KMC0oFDCPvJYOZr9ovNRfdEQm5J
AelAe2SsVQMN2TluOV4h
=oQfG
-----END PGP SIGNATURE-----