[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: stuff in ~/bin won't run



2009/1/13 Daryl Styrk <darylstyrk@gmail.com>:
> Mike Castle wrote:
>> On Tue, Jan 13, 2009 at 8:15 AM, Dotan Cohen <dotancohen@gmail.com> wrote:
>>> Put the new bin BEFORE the old path.
>>
>> Huh?  Why?
>
> According to "Learning the BASH Shell" by Cameron Newham and Bill
> Rosenblatt  it is dangerous to have personal bin directory listed before
> the public bin directories.
>
> I have no idea what the policy is for quoting excerpts from a book so
> I've chosen to leave it out.  If it's ok, I'll be happy to give up the
> couple of lines.
>

The first path with a matching name will be used. So if you have the
systemwide /usr/bin/firefox and your own personal ~/bin/firefox you
_must_ have your personal bin listed first in the path to get run.

Why is that dangerous? Because if your account is compromised then
critical system programs (ls, cd, and the like) can be easily replaced
with compromised versions. Putting your own bin at the end of the path
is meant to thwart this.

> I have no idea what the policy is for quoting excerpts from a book so
> I've chosen to leave it out.  If it's ok, I'll be happy to give up the
> couple of lines.
>

Fair use: pretty much it you can type it out in a few lines it's fair game.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü

Reply to: