HT4103: Mac OS X: sudo command requires a non-blank admin passwordLearn about Mac OS X: sudo command requires a non-blank admin password
Currently Being ModeratedFeb 4, 2012 10:47 AM (in response to afzalur-rahman)
Chances are your PATH environment variable has been messed up.
Did you follow some instructions to modify your PATH and store it in .profile (or .bash_profile, or .bash_login, or .bashrc)? This is typically how PATH gets messed up.
If you have created one of the above mentioned files, you can most likely either delete it or rename it using
/bin/mv .profile profile.save # rename it
/bin/rm .profile # delete it
Substitute the name of the shell initialization file you created for .profile
Then quit Terminal and start a new session.
If this is not what happened, then please provide the output from the following command:
Currently Being ModeratedFeb 4, 2012 7:32 PM (in response to BobHarris)
I am new user on mac. So please told me how i can change this.
When i type $path it show
Arifur-Rahmans-MacBook-Pro:~ arif$ $PATH
-bash: /usr/local/mongodb-osx-x86_64-1.8.2/bin:$: No such file or directory
Please note that py private folder is not showing . It is some how hidden.
So what can i do now.
Currently Being ModeratedFeb 5, 2012 10:34 AM (in response to afzalur-rahman)
When I said type
I did mean PATH in ALL CAPITALS. When working on the Unix side of Mac OS X, as weill all Unix systems upper and lower case do matter.
But from the error message, I can see that somewhere along the way, mongodb (a database package), and the modification of PATH was done incorrectly.
If you installed MongoDB, AND if the instructions had to modify your .profile (or perhaps .bash_profile), then either their instructions were wrong, or you missed a step, which explains why you can not enter commands are not found
PATH is a Unix environment variable that contains a colon separate list of directories where the shell will look for commands when you enter them at the command prompt.
So your choices are delete the offending .profile (or perhaps .bash_profile) and forget about MongoDB, or if you do need MongoDB, then fix your .profile (or .bash_profile) so it has a properly formed PATH environment variable.
Fixing this would look like
/bin/ls -a # this will show you all the files starting with a period (dot) as in .profile or .bash_profile /usr/bin/nano .profile
now in this text editor use the arrow keys, and the delete key to find and delete offending text, then type in the corrected text. Nano gives you a menu at the botton of the editor with additional commands. ^O (Control-O) writes out any changes you made. ^X (Control-X) exits from Nano.
You want your PATH variable to look like (REMEMBER UPPER/lowercase is IMPORTANT) ALSO spaces or nospaces are important.
NOTICE there is a colon between the MongoDB directory path, and the $PATH. The $PATH will append your existing PATH to the end of the new PATH environment variable you are setting up. The entire PATH string is enclosed in double quotes. ALSO NOTICE, there is only 1 space between export and PATH. No spaces anywhere else in the line.
Again, I used .profile as the most likely file name, HOWEVER, your shell will look for 1 of 3 different initialization files starting with
If will use the first file it finds in the above order and stop looking as soon as it finds a match. So it is important that you edit the correct file. The
command will tell you want leading period filenames exist in your home directory
I'll also give you one word of caution. When playing on the Unix side of Mac OS X, and following instructions you do not understand, it is generally wise to have a very recent full backup of your system. There are some commands that can make your system unusable should you enter them blindly.
Message was edited by: BobHarrisMacBook Pro, Mac OS X (10.7.2), 27" i7, MacBook, MacMini, etc...