RHEL 5 Default $PATH
To satisfy security requirements, I need the default, out-of-box configuration for the root user's $PATH. Basically I need to configure the root user's executable search path to match how the vendor (RedHat) ships it. Does anyone have this information?
Thanks.
Responses
If you look at the rootfiles RPM (# rpm -ql rpm -qf /root/.bash_profile), you'll see:
/root/.bash_logout
/root/.bash_profile
/root/.bashrc
/root/.cshrc
/root/.tcshrc
If you do "rpm -qV rpm -qf /root/.bash_profile" and the results are other than null, you can use yum to download the rootfiles RPM, then use rpm2cpio to extract the files from that RPM and then replace the current dot-files in /root with what's in the RPM.
You might also want to verify that /etc/profile hasn't been altered (#rpm -qV rpm -qf /etc/profile) and fix as necessary
-tom
Bleah: the discussions formatting system apparently eats back-ticks. Normally, you can nest the execution of commands inside the another command by using back-ticks:
rpm -ql `rpm -qf /root/.bash_profile`
The other option is to use $() formatting (this will be dependent on the shell used. BASH, KSH and other extended bourne shell derivatives use this method). Thus, you can also use:
rpm -ql $(rpm -qf /root/.bash_profile)
instead of using back-ticks
Hi Sal.
rpm -ql rpm -qf /root/.bash_profile
It might be that browsers delete the back quote from the view
So you can do it in two steps
1) rpm -qf /root/.bash_profile
rootfiles-8.1-6.1.el6.noarch
Version will differ for RHEL5
2) rpm -ql rootfiles-8.1-6.1.el6.noarch
/root/.bash_logout
/root/.bash_profile
/root/.bashrc
/root/.cshrc
/root/.tcshrc
output will be al most the same.
Regards,
Jan Gerrit
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
