- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: What is the meaning of :.: in the 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
02-21-2006 02:15 AM
02-21-2006 02:15 AM
Best Regards,
Eric Antunes
Solved! Go to Solution.
- Tags:
- PATH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 02:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 02:18 AM
02-21-2006 02:18 AM
Re: What is the meaning of :.: in the PATH?
the :.: means "and current directory".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 02:18 AM
02-21-2006 02:18 AM
Re: What is the meaning of :.: in the PATH?
Don't put . in the PATH - why?
A malicious user could create a script in say their home dir called "ls"
In it is "rm -rf /*"
As root - if you were in their dir and executed ls - and if . was before /usr/bin in your PATH - then the user's ls script would execute...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 02:19 AM
02-21-2006 02:19 AM
Re: What is the meaning of :.: in the PATH?
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 02:20 AM
02-21-2006 02:20 AM
Re: What is the meaning of :.: in the PATH?
It means, you have added the current directory. It is harmful when you set this as a root.
A security threat. (in case of root)
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 02:20 AM
02-21-2006 02:20 AM
Re: What is the meaning of :.: in the PATH?
strange question comming from a king ...
the meaning of :.: is you want to search current dir for executables.
in your case, assignement means
1) search $HOME/bin
2) search previous $PATS's dirs
3) search current directory (e.g; the one the shell is)
4) search /disc1/patches/zzzip
Jean-Yves Picard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 02:25 AM
02-21-2006 02:25 AM
Re: What is the meaning of :.: in the PATH?
This is oracle user PATH and I don't understand the need of this...
Best Regards,
Eric Antunes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 02:28 AM
02-21-2006 02:28 AM
Re: What is the meaning of :.: in the PATH?
As you can see from /.profile,
#cat /.profile
# @(#)B.11.11_LR
# Default (example of) super-user's .profile file
# Do not put "." in PATH; it is a potential security breach.
# Do not put "/usr/local/bin" in PATH; it is a potential security breach.
# Example assumes /home/root exists.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 02:49 AM
02-21-2006 02:49 AM
Re: What is the meaning of :.: in the PATH?
imagine this:
a user writes a script to do some action, e.g. to add himself to the root user group in passwd. This action can only be done as root. Now he stores the file in /tmp and gives a filename like "ll" or "pwd".
If you (logged on as root) now issuing a "pwd" in /tmp and the dot is included in your PATH variable, the script will be executed. Thats why this is dangerous and should be avoided.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 03:00 AM
02-21-2006 03:00 AM
Re: What is the meaning of :.: in the PATH?
If the last character in $PATH is :, it's the same as :.: and if two adjacent :: are in $PATH, it means :.: (this is a common error caused by editing /etc/PATH or bad install scripts. As mentioned, the current working directory (seen by the pwd command) should always be assumed to be suspect. In fact, some sysadmins learned that the way to run a program is to cd to the directory and then type the command name (leftover from bad DOS habits).
$PATH can be a severe security risk for users, and especially for the root superuser. /etc/PATH establishes a default set of 'safe' paths to look for executazbles but it often turns into a massive list of possibile locations, often due to applicsation installers. root's PATH should be different and more restrictive than user PATH values.
Also, don't use which and whereis to 'locate' programs as they do not follow the rules that a shell uses. Instead, determine where a particular executable will be found by using the whence command, specifically whence -v (which is aliased to: type) This command tells you exactly the path that a specific command has in your current environment. It is not a 'find' command but a "what will happen if" command.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 03:48 AM
02-21-2006 03:48 AM
Re: What is the meaning of :.: in the PATH?
I will let those oracle and applmgr PATH definitions as they are because this is needed to apply application patches, for example.
Best Regards,
Eric Antunes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 02:46 PM
02-21-2006 02:46 PM
Re: What is the meaning of :.: in the PATH?
Then you don't need to execute script as,
# ./scriptname.sh
# scriptname.sh
is enough. You can include a scriptfile with out syntax as,
# . ./scriptname.sh
simply as,
scriptname.sh
in any other script(s). How ever it is not good to add it. Try to remove that . in PATH.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 03:23 PM
02-21-2006 03:23 PM
Re: What is the meaning of :.: in the PATH?
Have a look at this doc from CERT,
http://www.cert.org/tech_tips/usc20.html
[UNIX Security Checklist v2.0]
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 05:19 PM
02-21-2006 05:19 PM
Re: What is the meaning of :.: in the PATH?
If you create a script file then you have to run it like
./script_name
But if you have the . in the path simply
script_name will run
Now it depends on you whether you want it or not :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 10:24 PM
02-21-2006 10:24 PM
Re: What is the meaning of :.: in the PATH?
Thank you!