- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Chapter III - User's environments and /etc/pro...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 02:32 AM
тАО02-24-2010 02:32 AM
Re: Chapter III - User's environments and /etc/profile
----
>>>> It depends on how many user's want this in their path vs how many don't.
Honestly, i dont know. I just have 2 users, root and oracle. These are just DB server and will not be other services. So should i set these environments for global or just oracle? Could u give me an idea\advice?
P.S. Yesterday, i e-mail to person who used before this server and he answered that there probably might be environments in the bash_profile,or in the bashrc, or in the .profile. How can i check bash_profile and bashrc? (whereis and find didnt help).
Regards,
Rustam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 02:40 AM
тАО02-24-2010 02:40 AM
Re: Chapter III - User's environments and /etc/profile
bash_profile can be found on $HOME directory from every user having bash as the shell. I doubt that you are using bash on HP-UX.
bashrc also is related to bash shell.
Those are Linux common shells.
On HP-UX you are using by default bourne shell
This shell is using profile (actually it is .profile) on the same $HOME directory for each user.
man sh-bourne
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 02:44 AM
тАО02-24-2010 02:44 AM
Re: Chapter III - User's environments and /etc/profile
I was talking about bash.
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 04:09 AM
тАО02-24-2010 04:09 AM
Re: Chapter III - User's environments and /etc/profile
> Horia: On HP-UX you are using by default bourne shell
No, you are using the Posix shell. The old Bourne shell is long gone. HP-UX uses the Posix shell (see the manpages for 'sh-posix').
Normal users use '/usr/bin/sh' which is compiled with dynamic libraries and minimizes the running memory footprint. The root account has the '/sbin/sh' as the default shell since this is compiled with static libraries that do not require the '/usr' filesystem to be mounted during startup.
Never change 'root's default shell (in '/etc/passwd') from '/sbin/sh' to anything else. To do so may leave you with an un-bootable system.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 08:54 PM
тАО02-24-2010 08:54 PM
Re: Chapter III - User's environments and /etc/profile
Then you just modify ~/.profile of the user that needs those extra PATH directories.
As Horia said, ~ is a shortcut for $HOME.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 10:05 PM
тАО02-24-2010 10:05 PM
Re: Chapter III - User's environments and /etc/profile
Thank you for the necessary correction, James.
Like bourne shell, posix is using .profile and /etc/profile.
Anyway, this would lead to the following obvious observation: Should find out what shell is using the oracle user. If it is a bourne, korn or standard posix shell, you should look for profile files (should be $HOME/.profile). If it a csh, then you should look for .cshrc
If the shell is bash then you should look for .bash_profile. But if you did not find /etc/bashrc file, then probably bash is not installed on your system.
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2010 10:17 PM
тАО02-25-2010 10:17 PM
Re: Chapter III - User's environments and /etc/profile
I read some e-books about setting of user's environment and found out some details.
now i know different between /etc/profile and ~/.profile and when each one runs.
I found out interesting things. All environments which are i set through the CLI and found in ~./bash_profile, not in ~./profile. So ex-DBA set them in ~./bash_profile before. As far as i know ~./bash_profile runs when my shell is bash, right? i checked and found that my current SHELL is SH
SHELL="/sbin/sh"
SHLVL="3"
TERM="vt100"
TZ="WST-5WSTDST"
So should i change my SHELL then do i have to change these environments in another profile file? I mean does SH SHELL is ok? or which shell is suitable for use?
And what does CDE login mean?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2010 10:58 PM
тАО02-25-2010 10:58 PM
Re: Chapter III - User's environments and /etc/profile
One observation: the variables that you set on your current shell
meaning by invoking:
VAR=value
export VAR
would exist only in that shell session. The profile file for the current user would not be affected by only setting a variable in the CLI.
>So ex-DBA set them in ~./bash_profile before.
This means that your ex-DBA used bash as a login shell.
>As far as i know ~./bash_profile runs when my shell is bash, right? i checked and found that my current SHELL is SH
SHELL="/sbin/sh"
SHLVL="3"
TERM="vt100"
TZ="WST-5WSTDST"
So you use the standard posix shell. This means that you must edit .profile for that user.
>So should i change my SHELL then do i have to change these environments in another profile file?
Yes, depending on the shell you use you need to update a different file. As usual, read manual page for the shell you use.
>I mean does SH SHELL is ok? or which shell is suitable for use?
Posix shell would be just fine. Just set the correct environment for your application.
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2010 11:21 PM
тАО02-25-2010 11:21 PM
Re: Chapter III - User's environments and /etc/profile
(This is typically called setting environment variables.)
>~./bash_profile runs when my shell is bash, right?
Yes.
>I checked and found that my current SHELL is SH: SHELL="/sbin/sh"
No, that just says your login shell is sh.
>So should I change my SHELL then do I have to change these environments in another profile file?
Only if you want $SHELL to be accurate.
>does SH SHELL is ok? or which shell is suitable for use?
Sure, the Posix shell is the default HP-UX shell.
>And what does CDE login mean?
That's what you have when you have a workstation and you use the graphical interface to login.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2010 03:34 AM
тАО02-26-2010 03:34 AM
Re: Chapter III - User's environments and /etc/profile
Should i change ~/.profile for using SHELL sh or should i change shell to bash for using ~/.bash_profile?
1. if first way- sh, what should set\type in ~/.profile? i checked and found some operators
2. if the second - bash, what should i do to change shell from sh to bash?
regards and thank you,
rustam