- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- double slash in PATH
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
Forums
Discussions
Discussions
Discussions
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
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
05-24-2006 08:55 AM
05-24-2006 08:55 AM
What is the reason for or purpose of allowing double slashes in the PATH variable? Why does the default PATH variable on a system delivered from HP with HP-UX already installed contain double slashes in some of the directory specifications? From the limited testing and searching I have done, it looks as though a double slash is silently interpreted as a single slash, so it appears to have no effect whatever.
- John
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2006 09:01 AM
05-24-2006 09:01 AM
Re: double slash in PATH
That sounds like a filter (script) gone wrong. As noted, the extra slash(es) are benignly interpreted as one slash.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2006 09:08 AM
05-24-2006 09:08 AM
Re: double slash in PATH
I've seen this more than once. IIRC /opt/hpnp is a known offender.
Just ignore it
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2006 09:12 AM
05-24-2006 09:12 AM
Re: double slash in PATH
In the posix shell, from the command line, it makes no difference whether I issue an ls command with a single slash, or several:
# ls /opt/perl
bin html lib man
# ls /opt//////perl
bin html lib man
#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2006 09:23 AM
05-24-2006 09:23 AM
Re: double slash in PATH
What can happen is:
Some script does the following:
export APP_PATH=/dir1/dir2/
export PATH=${APP_PATH}/bin:${APP_PATH}/sbin:${PATH}
That will lead to:
/dir1/dir2//bin:/dir1/dir2//sbin:a bunch of other stuff
in your path. It essentially falls into the bad coding category.
If it bothers you, it should be relatively easy to check /etc/PATH, /etc/profile, ~/.profile or whatever and find the offending entries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2006 01:50 PM
05-24-2006 01:50 PM
Solution/usr/bin
and then add any specific paths that *ALL* users need. Do NOT include root users as they will need paths in directories that normal users can't even read. Adjust specific user by appending specialty directories, and of course, root gets all sorts of special directories appended in .profile.
One of the biggest errors in PATH is the occurance of the current working directory. Most sysadmins realize how bad the security risk is with this element, but just as many will fail to see the PWD in $PATH because it can appear in several different ways. The most common error is :: which is the same as :.: but also a trailing colon at the end of $PATH.
Another really important issue in PATH is the actual directory: Does it exist at all? Are the permissions secure enough to prevent dropping a Trojan horse into it? Has the directory appeared more than onec in $PATH? Is the directory actually a symlink?
Here is a script that will analyze /etc/PATH as well as the current user's $PATH.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2006 12:14 AM
05-25-2006 12:14 AM
Re: double slash in PATH
I want to remark, that in DomainOS - some may rememeber - a double slash at the beginning of a pathname meant something really different - the superroot of a network.
E.g. //node_4671/usr/local was a pathname locating at an other host.
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2006 03:54 AM
05-25-2006 03:54 AM